Include mailboxes in account backup bundles #28

Merged
parkel merged 2 commits from feature/account-backup-mailboxes into main 2026-11-21 12:44:16 +01:00
2 changed files with 31 additions and 18 deletions
Showing only changes of commit f988379834 - Show all commits

No files matched your search

+3 -2
View File
@@ -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
+28 -16
View File
@@ -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-<suffix>.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/<domain>/<local-part>.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-<suffix>.json` and `database-<suffix>.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/<domain>/<local-part>.json` and
`mailboxes/<domain>/<local-part>.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