From f988379834a60717f5c724cf45b0936dc1507ad9 Mon Sep 17 00:00:00 2001 From: Peter van Arkel Date: Sat, 21 Nov 2026 12:41:15 +0100 Subject: [PATCH] Document account backups that include mailboxes --- docs/deployment.md | 5 +++-- docs/development.md | 44 ++++++++++++++++++++++++++++---------------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/docs/deployment.md b/docs/deployment.md index 61abeb5..a84659c 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -356,8 +356,9 @@ managed database and restore it to an empty database with the same identity. ## Back up an account's website and databases -Download the account backup manifest from the panel. Use it to create one -ZIP on a single server or bundle native archives from separate nodes. +Download an account backup manifest from the panel. Use it to create one ZIP +on a single server or bundle native archives from separate nodes. The CLI can +also include mailbox archives when the downloaded manifest lists mailboxes. [Account backup and recovery](development.md#back-up-a-hosting-account) ### Start local account backups from the panel diff --git a/docs/development.md b/docs/development.md index 5ac9a4b..02aaec3 100644 --- a/docs/development.md +++ b/docs/development.md @@ -894,16 +894,20 @@ backup. The website can be recovered while its web services are stopped. Open the account as an operator and select **Download backup manifest**. The manifest lists the primary website and all database requests for the account. -Provision those resources before running the backup. The ZIP archive contains -the native website archive and a compressed SQL dump for each listed database. -Back up mail, DNS, and panel settings separately. +Select **Download backup manifest with mail** to also include mailbox requests +from every mail domain assigned to the account. This option requires permission +to view mailbox requests. Provision all listed resources before running the +backup. The ZIP contains the native website archive, a compressed SQL dump for +each listed database, and the requested mailbox archives. Back up DNS and panel +settings separately. -On a single-server installation, operators can also start a backup and view -its status directly on the account page. +On a single-server installation, operators can start a backup of the website +and databases directly from the account page and view its status there. [Enable account backups in the panel](deployment.md#start-local-account-backups-from-the-panel) -On a server hosting both the website and its databases, run the account backup -command as root. Add `--socket PATH` when MariaDB uses a custom socket. +If all resources in the manifest are on one server, run the account backup +command there as root. To include mail, pass the manifest downloaded with +mail. Add `--socket PATH` when MariaDB uses a custom socket. ```sh sudo install -d -m 0700 /var/backups/coulobre @@ -912,9 +916,10 @@ sudo /opt/coulobre/bin/coulobre-account-backup create \ ``` Use a new archive filename. Allow space for the component archives and the -finished ZIP while it is assembled. The website and databases are captured -in sequence. Pause application writes, SFTP uploads, and schema changes across -the components if they need to represent a single point in time. +finished ZIP while it is assembled. Maildir snapshots also need space on the +mail volume. The components are captured in sequence. Pause changes to the +listed resources during backup if they need to represent a single point in +time. ### Bundle backups from separate nodes @@ -923,7 +928,10 @@ on the web node and the [database backup command](#back-up-and-restore-a-managed on each database node. Transfer the resulting files to a root-controlled directory with mode `0600` on every archive. Name the website archive `website.tar.gz` and each SQL dump `database-.sql.gz`, for example -`database-cms.sql.gz`. Assemble the ZIP with the same account manifest. +`database-cms.sql.gz`. When the manifest includes mail, use the +[mailbox backup command](#back-up-and-restore-a-mailbox) on the mail node and +place each archive under `mailboxes//.tar.gz` within the +component directory. Assemble the ZIP with the same account manifest. ```sh sudo /opt/coulobre/bin/coulobre-account-backup pack \ @@ -944,11 +952,15 @@ sudo /opt/coulobre/bin/coulobre-account-backup unpack \ Use the recovered `website.json` and `website.tar.gz` with `restore-site`. Use each `database-.json` and `database-.sql.gz` pair with -`restore-database`. Transfer the relevant pairs when the destination uses -separate nodes. For a full recovery, prepare an empty document root and empty -managed databases with the original manifests and restore all components before -resuming application traffic. To recover one website file, use the website pair -with the existing `restore-site --file` option. +`restore-database`. For mail, use the original manifest and archive recovered +as `mailboxes//.json` and +`mailboxes//.tar.gz` with `restore-mailbox`. +Transfer the relevant pairs when the destination uses separate nodes. Prepare +an empty document root, empty managed databases, and any newly provisioned +destination mailboxes before restoration. Resume traffic after the components +have been restored. To recover one website file, use the website pair with the +existing `restore-site --file` option. Existing website and database bundles +continue to unpack with the same filenames. ## Run an isolated PHP test site