Backing up and restoring
Choose what's backed up, where it goes and when, how long it's kept, and how to put a site, database or mailbox back.
For server admins: the steps need admin access to the panel or the server.
Backups are set up on Server → Backups & migration → Schedule & destinations, and the results are on Completed backups. Customers restore their own sites and databases from each domain's Backups tab, so most restores don't need you at all.
A new server backs up site files, databases and the panel's own database every night at 02:00 UTC, to a folder on the server, and keeps them 3 days. Mailboxes aren't included, and nothing leaves the server. Add an off-site copy before you rely on it.
Choosing what's backed up
Under What to include:
- Panel database: Hostctl's own accounts and settings.
- User databases: every MySQL, MariaDB and PostgreSQL database.
- Domain document roots: every site's files. Tick Incremental file backups to store only what changed since the last run, with a full backup every 7 days.
- Mailboxes: every domain's mail.
Press Save settings after any change on this page.
The Domains tab fine-tunes each domain: turn Include files or Include mail off for one domain, choose its S3 mode, or press Exclude dirs to leave out folders such as caches. One-off backs up that domain alone, straight away.
Where backups go
Local keeps backups in a folder on the server, /var/backups/hostctl
unless you change Backup directory. Quick to restore from, but lost with
the server.
Remote (S3) sends them to any S3-compatible storage: Amazon S3, Backblaze B2, Wasabi, MinIO and others.
- Tick Enable S3-compatible remote backup.
- Leave Endpoint URL empty for Amazon S3, or enter your provider's endpoint.
- Fill in Region, Bucket, Access Key ID and Secret Access Key. Path prefix is the folder inside the bucket.
- Choose an Upload mode:
- Single archive builds one compressed file, then uploads it. It needs free disk space for that file.
- Stream directly to S3 sends each domain's files without writing them to disk first. Use it for large sites or a nearly full disk.
You can use both destinations at once, and should.
When backups run
On the Schedule tab, tick Enable automatic scheduled backups, then choose Daily or Weekly, the Hour (UTC), the Minute and, for weekly backups, the Day of week. At least one destination must be on.
Run Backup Now, at the top of the page, starts a full backup straight away. Only one backup runs at a time.
How long backups are kept
Each destination has its own Retention (days): 3 days locally and 30 on S3 to begin with. Older backups are deleted after each run. Incremental backups are kept as a set: the full backup and its increments stay until the newest of them expires. A backup taken just before a domain was deleted is kept at least 30 days.
Checking that backups work
Completed backups lists every finished backup with what it holds. Filter by domain, Trigger (manual or scheduled), Destination and date, and press Download to take a copy.
A backup marked Incomplete is missing files that couldn't be read when it ran; the list names them. Admins get an email whenever a backup fails or is incomplete, and Server → Overview flags failed backups, scheduled backups being off, and sites with no recent complete backup.
Restoring a website or database
The quickest way is the domain's own Backups tab. Its owner can use it too.
- Open the domain and go to Backups.
- Press Restore… on the backup you want.
- Tick the Websites (the main site, subdomains) and Databases to put back.
- Under Files, choose how:
- Put back the backup's files replaces the files that are in the backup and keeps anything added since.
- Make it exactly like the backup also removes files added since.
- Press Restore and confirm. Progress shows under Restores.
Files come back owned by the site, with their permissions, even if the website's folder was deleted.
A restored database replaces the current one completely. Orders, comments or posts added since the backup are lost, so take a fresh backup first if you might need them.
After an exact restore, the files it replaced are kept for 7 days. Undo the restore puts them back, removing anything written since; Delete them now throws them away.
The tab offers backups stored on the server, and S3 backups made as a single archive. For backups streamed to S3, use Completed backups.
Restoring from Completed backups
Completed backups can open any backup and import its pieces one by one:
- Restore (or Restore Archive for streamed backups) opens a backup. Tick what you need and press Extract Selected.
- For a database dump, choose the Target database and press Import. It replaces that database's contents.
- Browse S3 lists the archives in your bucket, each with its own Restore. Restore Raw and Restore Files work with streamed S3 backups.
Writing site files or mail back from this page works only for older shared (not isolated) accounts. For everyone else, restore site files from the domain's Backups tab.
The panel's own database can't be restored from the page: the restore tool runs during offline maintenance, and keeps the current database so you can go back.
Restoring a mailbox
The domain's Backups tab doesn't restore mail. Completed backups can extract a domain's mail archive, but can write it back only for older shared (not isolated) accounts. To keep a copy of a customer's mail before a risky change, use Back up only on their Offboard… page (see Managing customer accounts), which packages every mailbox with the sites and databases.