Setting up the registry components backup schedule and retention time

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

1. General description

The platform provides the ability to manage the schedule for creating backup copies of registry components and the time span for storing such copies in the backup repository.

Backup copies of components are created using the velero tool and stored in a secure minio backup repository located outside the Platform cluster.

The backup schedule is configured in the unix-cron format on the Control Plane administrative panel interface.

The retention period for backup copies must be greater than or equal to one unit, be a whole number, and not contain special characters.

The values are stored in the registry configuration deploy-templates/values.yaml file.

The corresponding parameters are applied through the Create-registry-backup-<registry-name> Jenkins pipeline.

2. Setting up a schedule

It’s vital to schedule backups when your system is least busy. We recommend doing this at night. This way, everything will proceed smoothly and without any inconveniences.
  1. Log in to the Control Plane console as the Registry administrator.

    update cluster mgmt 01

  2. Go to the Registries section and select the required one.

    change key 01

  3. Click the Edit button located in the upper right corner.

    You can also set up a backup schedule and retention time while creating a registry. However, it is not mandatory.

    change key 02

  4. Go to the Backup section. Here you can set the schedule for creating backup copies and the retention period. Turn the toggle on and configure the schedule for creating automatic backup copies.

    By default, the Set automatic backup copy toggle is turned off for new registries.

    backup schedule registry components 01

    The backup schedule is configured in the unix-cron format and is defined based on Kyiv time.

    By default, the Europe/Kiev time zone is set in the values.yaml configuration and at the Jenkins pod level as an environment variable.

    The offset of +2 hours (UTC+2) in winter and +3 hours (UTC+3) in summer is taken into account.

    Use the https://crontab.guru/ resource, a simple and convenient cron expression editor, to better understand the logic of schedule settings.

    • In the Schedule field, enter, for example, the following value: 5 11 * * MON-FRI. Use space as a separator.

      This means that a backup copy for the registry environment will be created every day from Monday to Friday at 10:05 according to Kyiv time.

      After entering the backup schedule, a hint appears on the interface showing the time of the next 3 backup creation runs.
    • In the Retention time (days) field, enter, for example, the following value: 5. This means that the backup will be stored in the repository for 5 days.

      The value can only be a positive number and should not be set to less than 1 day. It is recommended to set the retention time longer than the period between creating copies.

      backup schedule registry components 02

  5. Click CONFIRM to save the changes.

    As a result, a request for update with the status New will be generated.

  6. Go back to the Registries section, scroll down the page, and find the Requests for update section.

    cp submit mr 1

  7. Open the generated request by clicking the view icon  — 👁.

    The proposed changes will be applied to the deploy-templates/values.yaml configuration file upon confirmation.
  8. In the new window, compare the two versions of the changes, make sure the data you entered is correct, and click Confirm. You can also reject the changes to the configuration immediately by clicking Reject.

    The comparison window allows you to conveniently check the two versions of the changes: the current one (on the left) and the new one (on the right).

    backup schedule registry components 12

    cp submit mr 3

    As a result, the request will change the state to confirmed. At the specified time, the Create-registry-backup-<registry-name> Jenkins pipeline will be triggered. It applies the parameters of the specified configuration and creates backups in the backup repository.

  9. Wait until the code build is completed. This may take a few minutes.

3. Checking the created backups

At the specified date and time, backups should be created according to the schedule specified in the configuration (see --Setting up a schedule)

You can check this as follows:
  1. In the registry information, open the Registry components section and navigate to Jenkins.

    backup schedule registry components 1

  2. Go to the folder with the corresponding registry and select the Create-registry-backup-<registry-name> pipeline. If the pipeline is highlighted in green, the build can be considered successful.

    backup schedule registry components 2

  3. Open the build details.

    backup schedule registry components 3

  4. Go to the console output (Console Output) to view the technical log of the pipeline execution.

    backup schedule registry components 4

  5. Scroll down the page and make sure that the registry backup has been created.

    Example 1. Console Output. Successful creation of registry backup
    [INFO] Velero backup - external-1-2023-02-17-17-07-36 done with Completed status

    This expression indicates that a backup has been created for the registry with a specific name (here - external-1), the date and time of backup creation, and the successful completion status.

    backup schedule registry components 5

    After the retention period expires, the backup system deletes outdated backup copies.