Manually back up and restore a registry instance

🌐 This document is available in both English and Ukrainian. Use the language toggle in the top right corner to switch between versions.

After successfully deploying a registry and its regulations, the Platform administrator can manually create a backup. The system stores this backup in a secure S3-compatible MinIO storage outside the OpenShift cluster to improve safety.

You can later restore the registry from this backup if needed.

1. Creating a registry backup

Schedule backups during periods of lowest system load. We recommend running them at night to avoid failures and prevent any impact on users.

To create a registry backup:

  1. Sign in to the Control Plane using your login and password.

  2. Go to the Registries section and select the registry you want to back up.

  3. In the Configuration section on the registry configuration page, click the Jenkins link in the CI field. Then, on the All tab, find the pipeline named Create-registry-backup-<registry-name>, where <registry-name> is your registry’s name.

    To learn more about pipelines, see Monitoring the deployment of changes.

    control plane create backup job

  4. Open the folder and click Build with parameters to launch the Create-registry-backup pipeline.

    control plane create backup 01

  5. Click Build.

    control plane create backup 02

    control plane create backup 03

    When the job completes successfully, it creates a backup of the registry and its regulations and uploads it to the corresponding MinIO backup directory.

Replicating Ceph OBC data

The Create-registry-backup pipeline runs two processes in parallel: it creates a registry backup and starts replication of Ceph Object Bucket Claims data. By default, the system starts replication at 19:30 UTC.

To change the replication time, update the schedule in the configuration:

  1. Open the OpenShift cluster web console.

  2. In the top-right corner, click Copy login command  Display Token.

  3. Copy the login token from the Log in with this token field. It might look like this:

    Example oc login
    oc login --token=sha256~gQa0bxg_aaabbbcccd_D88470E-aabBcQuCn9keIM4I --server=https://api.env.dev.registry.eua.gov.ua:1234
  4. Open the OpenShift CLI and run the login command.

  5. To change the replication schedule, run the following command:

    namespace="abc-02"; schedule='19 12 * * *'; for cronJob in `oc get cronjob -n velero -o custom-columns="NAME:.metadata.name" --no-headers | grep "${namespace}"`; do oc -n velero patch cronjob/$cronJob -p '{"spec":{"schedule":"'$schedule'"}}'; echo 1; done
    Replace namespace="abc-02" with your actual registry namespace. For example: namespace="test-registry".

➡️ To learn more about replication, see Managing the registry backup schedule.

2. Restoring a registry

To restore a registry from a backup:

  1. Sign in to the Control Plane using your login and password.

  2. Go to the Registries section and select the registry you want to restore.

  3. In the Configuration section on the registry configuration page, click the Jenkins link in the CI field. Then, on the All tab, find the pipeline named Restore-registry-<registry-name>, where <registry-name> is your registry’s name.

    control plane create restore

  4. Open the folder and click Build with parameters to launch the Restore-registry pipeline.

    control plane create restore 01

  5. Click Build.

    control plane create restore 02

  6. When prompted to select a backup version, open the Console Output from the left panel and click Input requested.

    control plane create restore 03

  7. Select the desired backup version from the list and click Proceed.

    control plane create restore 04

    If the Restore-registry pipeline completes successfully, the system restores the registry using the selected backup version.

    control plane create restore 05