Replication
Ferry can keep each backup in more than one place. Three methods are available, each for a different failure, and you can combine them.
| Method | What is copied | Where it is kept | Protects against | Configured in |
|---|---|---|---|---|
| Second copy | Every backup taken under a policy, with its own retention | A second repository, at another site or provider | Loss or corruption of the backup repository | The protection policy |
| Storage replica | Every object in a repository | A replica that your object storage maintains | Loss of the site that holds the repository | Your object storage, then a repository registration |
| Standbys and mirrors | Volumes kept ready to start in another region | The other region's Ceph cluster | Loss of a region, with a short recovery time | Disaster recovery |
Restores in the region that took a backup read its backup repository. Another region recovers from the second copy or from a replica, as Disaster recovery describes.
Keep a second copy of every backup
As an operator, you add a second copy to a protection policy. After each backup under the policy commits, Ferry copies it to a second repository. The copy has its own retention, so a policy can keep daily backups for a week in the backup repository and monthly copies for a year in the second one.
Before you add the copy:
- Register the second repository. Choose storage in a separate failure domain: another site, another provider or another account.
- If plans under the policy use encryption, give the second repository the same encryption key as the backup repository. See Copy the encryption key.
- Console
- CLI
Open Protection policies and edit the policy. Under Storage, select Second copy in another repository, choose the repository and set how long copies are kept. Save the policy.
openstack backup policy set <policy> \
--copy-repository <repository> \
--copy-keep daily=7 --copy-keep monthly=12
--copy-keep sets the copy's retention with the same ladder as the policy's own retention:
all=<duration>, daily, weekly, monthly and yearly. Set it together with
--copy-repository.
The copy runs shortly after each backup commits. It writes only the data the second repository does not already hold, so copies of incremental backups stay small. If the second repository uses Object Lock, each copy is locked there until its own retention date.
Each backup's details show when it was copied. To stop copying, clear Second copy in another
repository in the policy, or run openstack backup policy unset <policy> --copy-repository.
Copy the encryption key
Each encrypted dedup domain has its own data key, and each repository holds the keys of the domains written to it. A copy into a repository that lacks the domain's key waits until the key is there, and the manager log names the domain and both repositories.
Export the key from the backup repository and import it into the second one, under a passphrase that you keep separately from the exported file:
ferry key export --repository <backup-repository> --domain <domain> --passphrase-file - --file domain.key
ferry key import --repository <copy-repository> --domain <domain> --passphrase-file - --file domain.key
ferry key list --repository <backup-repository> --domain <domain>
ferry key list --repository <copy-repository> --domain <domain>
The two fingerprints must match. Unencrypted backups use the plain
domain and need no key. Encryption explains what the
export contains and how it is audited.
Monitor copies
The coverage report counts, for each plan, the backups that the second copy has not reached yet:
openstack backup coverage show
Prometheus receives the same count per project as ferry_coverage_points_awaiting_copy. A count that
keeps growing usually means a missing encryption key or an unreachable second repository. The
manager log and the copy jobs' events name the cause.
Register a replica made by your object storage
Object storage that replicates a bucket to another site, such as S3 bucket replication, produces a second copy without Ferry writing it twice. Register the replica as a repository and name the repository it replicates:
openstack backup repository create <name> --kind <kind> --site <site> \
--endpoint <url> --bucket <bucket> --replica-of <repository>
--reachable-from-site names the sites that can read the replica. A
recovery promise in a policy can then be met
from the replica, and the recovery region reads backups from it. A replica needs no second copy in the
policy. Its consistency depends on your object storage's replication, including any delay before new
objects appear.
Keep standbys and mirrors in another region
For a short recovery time, Ferry keeps volumes ready to start in another region: warm standbys, kept current from each new backup, or hot copies through rbd-mirror between two Ceph clusters. Both are recovery tiers of Disaster recovery, set in the policy's recovery promise, and Failover covers moving servers between regions.