diff --git a/doc/administration/geo/disaster_recovery/planned_failover.md b/doc/administration/geo/disaster_recovery/planned_failover.md index 939b4aec968fb50b4003be38a37fb22046be9d9a..2a21bda23d730a841421fe7bf1212adea9ce6129 100644 --- a/doc/administration/geo/disaster_recovery/planned_failover.md +++ b/doc/administration/geo/disaster_recovery/planned_failover.md @@ -42,6 +42,38 @@ Repository-centric strategies for using `rsync` effectively can be found in the [moving repositories](../../operations/moving_repositories.md) documentation; these strategies can be adapted for use with any other file-based data, such as [GitLab Pages](../../pages/index.md#change-storage-path). +### Container registry + +By default, the container registry is not automatically replicated to secondary +sites and this needs to be manually configured, see [Docker Registry for a secondary site](../replication/docker_registry.md). + +If you are using local storage on your current primary site for the container +registry, you can `rsync` the container registry objects to the secondary +site you are about to failover to: + +```shell +# Run from the secondary site +rsync --archive --perms --delete root@<geo-primary>:/var/opt/gitlab/gitlab-rails/shared/registry/. /var/opt/gitlab/gitlab-rails/shared/registry +``` + +Alternatively, you can [back up](../../../raketasks/backup_restore.md#back-up-gitlab) +the container registry on the primary site and restore it onto the secondary +site: + +1. On your primary site, back up only the registry and [exclude specific directories +from the backup](../../../raketasks/backup_restore.md#excluding-specific-directories-from-the-backup): + + ```shell + # Create a backup in the /var/opt/gitlab/backups folder + sudo gitlab-backup create SKIP=db,uploads,builds,artifacts,lfs,terraform_state,pages,repositories,packages + ``` + +1. Copy the backup tarball generated from your primary site to the `/var/opt/gitlab/backups` folder +on your secondary site. + +1. On your secondary site, restore the registry following the [Restore GitLab](../../../raketasks/backup_restore.md#restore-gitlab) +documentation. + ## Preflight checks NOTE: