Document and deploy opt-in account backup recovery
This commit is contained in:
1 parent
d1ad61b121
commit
92bd75c196
8 files changed
+75
-30
No files matched your search
+52
-23
@@ -420,11 +420,11 @@ most one missed backup per account and continues with the next future time.
|
||||
Scheduled ZIPs are stored alongside manual backups and require the same
|
||||
server-side retention management.
|
||||
|
||||
#### Restore website files from the panel
|
||||
#### Restore from local account backups in the panel
|
||||
|
||||
Enable this feature when the website and account backup archive are on the
|
||||
same server. Install the restore socket and give the backup worker access to
|
||||
it.
|
||||
Enable local account backups first. Install the restore socket and give the
|
||||
backup worker access to it. The archive and the resources being restored
|
||||
must be on the same server.
|
||||
|
||||
```sh
|
||||
sudo groupadd --system coulobre-restore-requests
|
||||
@@ -432,35 +432,64 @@ sudo install -m 0644 deploy/systemd/coulobre-account-restore.socket \
|
||||
deploy/systemd/coulobre-account-restore@.service /etc/systemd/system/
|
||||
sudo install -D -m 0644 deploy/systemd/coulobre-backup-worker.service.d/restore.conf \
|
||||
/etc/systemd/system/coulobre-backup-worker.service.d/restore.conf
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
Set `COULOBRE_LOCAL_WEBSITE_RESTORE=1` in `/etc/coulobre/panel.env`.
|
||||
Enable the options you need in `/etc/coulobre/panel.env`.
|
||||
|
||||
| Setting | Additional restore permission |
|
||||
| --- | --- |
|
||||
| `COULOBRE_LOCAL_WEBSITE_RESTORE=1` | **Can add website restore job** |
|
||||
| `COULOBRE_LOCAL_DATABASE_RESTORE=1` | **Can restore an account database** |
|
||||
| `COULOBRE_LOCAL_MAILBOX_RESTORE=1` | **Can restore an account mailbox** |
|
||||
|
||||
Install the socket service drop-in for each enabled action. If you replace
|
||||
an existing website-only restore unit, install the website drop-in to keep
|
||||
website recovery enabled. MariaDB recovery uses the local default MariaDB
|
||||
socket. Mailbox recovery uses local Postfix and Dovecot.
|
||||
|
||||
```sh
|
||||
# Website restores
|
||||
sudo install -D -m 0644 deploy/systemd/coulobre-account-restore@.service.d/website.conf \
|
||||
/etc/systemd/system/coulobre-account-restore@.service.d/website.conf
|
||||
# Database restores
|
||||
sudo install -D -m 0644 deploy/systemd/coulobre-account-restore@.service.d/database.conf \
|
||||
/etc/systemd/system/coulobre-account-restore@.service.d/database.conf
|
||||
# Mailbox restores
|
||||
sudo install -D -m 0644 deploy/systemd/coulobre-account-restore@.service.d/mailbox.conf \
|
||||
/etc/systemd/system/coulobre-account-restore@.service.d/mailbox.conf
|
||||
```
|
||||
|
||||
```sh
|
||||
panel_manage migrate --noinput
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart coulobre-panel coulobre-worker coulobre-backup-worker
|
||||
```
|
||||
|
||||
Select **Restore website** on a completed backup for the current account and
|
||||
domain. Operators need the backup permissions listed above and **Can add
|
||||
website restore job**. A backup that includes mail also requires permission
|
||||
to view mailbox requests.
|
||||
Operators also need the backup permissions listed above and permission to
|
||||
view mailbox requests for any backup that includes mail. Select the restore
|
||||
action on a completed backup.
|
||||
|
||||
For one file, enter its path relative to the document root. Make sure the
|
||||
parent directory exists. Select **Replace the existing file at this path**
|
||||
only if an existing site-owned file should be overwritten. Choose **Entire
|
||||
website** to restore all website files to an empty document root. When
|
||||
replacing a file, its old and restored copies must fit within the website's
|
||||
storage quota during staging. The **Website restores** section records the
|
||||
source backup, operator, and result.
|
||||
- **Restore website** restores one file or all website files. A single file
|
||||
needs an existing parent directory. Select **Replace the existing file at
|
||||
this path** to permit overwriting. The old and restored copies must fit
|
||||
within the website quota during staging. The whole website option needs
|
||||
an empty document root.
|
||||
- **Restore database** offers databases listed in the backup that still
|
||||
belong to the account. Use the matching empty managed database and keep
|
||||
the application disconnected during recovery. If the import fails after
|
||||
creating objects, inspect the database before attempting another restore.
|
||||
- **Restore mailbox** offers mailboxes listed in the backup that still
|
||||
belong to the account. Use a newly provisioned mailbox with no Maildir.
|
||||
Keep delivery and client access paused for that mailbox during recovery,
|
||||
with Postfix and Dovecot running for local checks. The restored mailbox
|
||||
uses the destination credentials and current quota configuration.
|
||||
|
||||
Restore request records under `/var/lib/coulobre/account-restores/` prevent
|
||||
an interrupted worker from applying the same restore twice. Keep these
|
||||
records while corresponding jobs could still be delivered. If the panel
|
||||
cannot confirm a restore, check the destination before submitting another.
|
||||
Use the [account bundle commands](development.md#recover-backups-from-the-bundle)
|
||||
to recover databases, mail, or components on separate servers.
|
||||
The **Backup restores** section shows each target, source backup, operator,
|
||||
and result. Keep the request records under
|
||||
`/var/lib/coulobre/account-restores/` while corresponding jobs could still be
|
||||
delivered. If the panel cannot confirm a restore, check the destination
|
||||
before submitting another. For resources on separate servers, use the
|
||||
[account bundle commands](development.md#recover-backups-from-the-bundle).
|
||||
|
||||
#### Include mailboxes on the same server
|
||||
|
||||
|
||||
+3
-3
@@ -1073,9 +1073,9 @@ sudo /opt/coulobre/bin/coulobre-account-backup pack \
|
||||
|
||||
### Recover backups from the bundle
|
||||
|
||||
On a single-server installation, operators can restore one file or the entire
|
||||
website from a completed account backup. See
|
||||
[restoring from the panel](deployment.md#restore-website-files-from-the-panel).
|
||||
On a single-server installation, operators can restore a website file, an
|
||||
entire website, a database, or a mailbox from a completed account backup.
|
||||
See [restoring from the panel](deployment.md#restore-from-local-account-backups-in-the-panel).
|
||||
|
||||
Unpack to a new directory on a root-controlled path. The command verifies the
|
||||
ZIP contents and checks the identity and integrity of each compressed
|
||||
|
||||
Reference in new issue
Block a user