All manual sections

DocumentationBackup and restore

Backup and restore

A backup is a safety copy of the site. The panel saves the site files, the linked databases, the mail of its domains' mailboxes and the site settings, encrypted.

Choosing where to store backups

Open Backups and choose the destination:

  • S3-compatible: external storage (Amazon S3, Wasabi, Backblaze B2, MinIO…). It is the recommended choice, because backups stay safe even if the server breaks.
  • SFTP: another server or a backup space that accepts SFTP (a storage box, for example). Enter server, port, user and folder and save: the panel creates its SSH key and shows it to you. Add it to the authorized keys of the user on the destination, then run a test backup. The destination server's fingerprint is stored at the first connection.
  • FTP / FTPS: an FTP server, preferably with the encrypted connection (FTPS). Enter server, port, user, password and folder.
  • Google Drive: a folder of your Google Drive. On a computer with a browser install rclone and run rclone authorize "drive", sign in with the Google account and paste into the panel the text rclone prints. The panel only sees the folder it creates.
  • Local folder: a folder of the server, better on a different disk.

For FTP and Google Drive the panel uses rclone and installs it by itself when you save. Passwords and tokens stay encrypted in the panel and are never written in clear text on the disk.

On the first save the panel generates the repository password and shows it to you: keep it in a safe place, away from the server. Without this password the backups cannot be recovered if you lose the server.

Automatic backups

On the same page turn on the automatic daily backup and choose the time. Also set how many backups to keep (daily, weekly, monthly): older ones are deleted automatically.

You can also start a backup of all sites right away with Back up all sites now, or of a single site from its Backups tab with Back up now.

If a backup fails, administrators receive an email (see System emails).

Restoring

  1. Open the site and choose the Backups tab.
  2. Find the copy you want (they are sorted by date) and press Restore.
  3. Choose what to restore: site files, databases, mail of the site's mailboxes, site settings, in any combination.
  4. Press Start restore.

Restoring overwrites the current files and databases with those of the chosen copy. If unsure, first make a backup of the current state.

Site settings in the backups

Every backup also saves the site settings: PHP version and values, aliases, site rules (redirects, protected folders, blocked addresses, error pages), SFTP access, cron jobs, DNS records of this server's zones and the SSL certificate. In the list of backups you see how many cron jobs and DNS records each copy holds.

Restoring Site settings:

  • PHP, rules and SFTP access go back to how they were at backup time;
  • cron jobs become the backup's;
  • missing aliases and DNS records are added, none is removed;
  • the backup's certificate comes back only if the site has no working one today.

Backups made before version 0.64 do not contain the settings.

Downloading a backup

In the site's Backup tab, Download next to a copy saves to your computer a .tar.gz archive with four folders:

  • files/: the site files;
  • databases/: the database dumps;
  • mail/: the mailboxes, in Maildir format;
  • config/: the site settings, the certificates and the list of mailboxes.

The download comes straight from the backup repository, without using space on the server. The link works once for a few minutes: if it expires, press Download again.

Mail in the backups

If the site has mail enabled, every backup also saves the mailboxes of the main domain and of its aliases with mail: the messages of every folder, the password, the quota, forwarders, autoresponder and filters. This applies to automatic and manual backups, with the same destination and retention as the files. In the site's list of backups you see, for each copy, how many mailboxes it holds and how much space the mail takes.

To restore the mail tick Mail of the site's mailboxes and choose:

  • All mailboxes and forwarders, or
  • a single mailbox, from the list of the mailboxes in that copy.

Restoring mail overwrites and deletes nothing: missing messages come back, the ones already there stay as they are (even if they were read or moved in the meantime) and are not duplicated; messages received after the backup stay. A deleted mailbox is created again with its old password and settings; a deleted forwarder comes back when you restore all mailboxes.

If you disabled mail on the domain in the meantime, the restore enables it again with a new DKIM key: update the DKIM record in the DNS (see Mail).

WordPress sites: in the WordPress tab of the site the Backup card also has local copies (on the server, restored in seconds, with an automatic copy of the site before every restore). See WordPress.