Hosting·2 min read

Making and restoring backups on your hosting account

A backup of your files, databases and email every night. How to make one yourself, download it or restore it, including with Claude.

Your hosting account automatically makes a backup of your files, databases and email every night. By default we keep them for 30 days. You can also make, download or restore a backup yourself.

How do you restore a backup in DirectAdmin?

In DirectAdmin you'll find a wizard under Snapbak:

  • Make backup: one button, a full backup of your account. At most one per hour.
  • Restore backup: pick the day and time, what you want back (everything, files, databases or email) and how: download or restore.

How do you do it in the terminal?

The same actions have a command:

snapbak-user list                                   # available backups
snapbak-user policy                                 # when and how long they're kept
snapbak-user backup --wait                          # make a backup now
snapbak-user download latest --what db --wait       # databases as .tar.gz
snapbak-user restore <id> --what files --yes --wait # restore files

A download lands in ~/snapbak-downloads and stays there for 24 hours.

Can Claude restore a backup?

Claude knows these commands. Two rules Claude follows by default:

  1. A backup first, before risky changes. For example before WordPress, plugin or theme updates, database edits or deleting lots of files.
  2. Never restore without your explicit OK. Claude first explains what will be overwritten. Restoring always asks for permission, including in auto mode.

So feel free to ask: "Make a backup and then update WordPress" or "Restore the files from last night".

Restore or download?

Restoring overwrites the current content with that of the backup. Anything you changed afterwards is gone. Use it when a site is really broken.

Only want one file or one table back? Then download the backup and take just that part out of it. That's safer than restoring everything.

What a backup doesn't replace

  • A small file change by the assistant is quicker to reverse with Undo in the conversation.
  • A site connected to a Git repository is quickest to recover by deploying an earlier commit.
MK
Maarten Keizer

Founder of Invoker. Over twenty years in hosting, system administration and web development; builds the Claude hosting himself and tests everything on our own servers first.

about maarten