Setting up the central 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 allows for managing the schedule of creating backups for central components and the time for storing such backups in the backup repository.

The backups of components are created using the velero tool and stored in a secure backup repository called minio, located outside the Platform cluster.

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

The retention time for backups must be greater than or equal to one, be a whole number, and not contain special characters.

The list of central components for which backup scheduling and retention time can be configured includes:
  • Artifact repository - central component nexus.

  • Control panel for the Platform and registries—central component control-plane.

  • User Management - central component user-management.

  • Monitoring - central component monitoring.

The values are stored in the values.yaml configuration file in the cluster-mgmt repository.

The corresponding parameters are applied through the MASTER-Build-cluster-mgmt 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 Platform administrator.

    update cluster mgmt 01

  2. Go to the Platform management section and click on Edit.

    cp backup schedule 1

  3. Navigate to the Backup schedule section and configure the settings for the required central components.

    Currently, they are:

    1. Artifact repository - central component nexus.

    2. Control panel for the Platform and registries — central component control-plane.

    3. User Management - central component user-management.

    4. Monitoring - central component monitoring.

    cp backup schedule 2

    The backup schedule is configured in the unix-cron format and is determined by the server’s time in UTC.

    If you are configuring the schedule for Ukraine, take into account the +2 hours offset (UTC+2) in winter time and +3 hours offset (UTC+3) in summer time.

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

  4. Configure the schedule for the Nexus component and set the backup retention time in days:

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

      This means that a backup for the nexus component will be created every day from Monday to Friday at 11:05 UTC time (13:05 Kyiv time).

    • 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.

      cp backup schedule 3

  5. Configure the schedule for the Control Plane component and set the backup retention time in days:

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

      This means that a backup for the control-plane component will be created every day from Monday to Friday at 11:06 UTC time (13:06 Kyiv time).

    • In the Retention time (days) field, enter, for example, the following value: 6. This means that the backup will be stored in the repository for 6 days.

    cp backup schedule 4

  6. Configure the schedule for the User Management component and set the backup retention time in days:

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

      This means that a backup for the user-management component will be created every day from Monday to Friday at 11:07 UTC time (13:07 Kyiv time).

    • In the Retention time (days) field, enter, for example, the following value: 7. This means that the backup will be stored in the repository for 7 days.

    cp backup schedule 5

  7. Set up the schedule for the Monitoring component and specify the backup retention period in days:

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

      This means that a backup for the monitoring component will be created every day from Monday to Friday at 11:07 UTC time (13:07 Kyiv time).

    • In the Retention time (days) field, enter, for example, the value 8. This means that the backup will be stored in the repository for 8 days

    cp backup schedule 6

  8. Click Confirm to save the changes.

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

  9. Go back to the Platform management section, scroll down the page, and find the Update requests section.

    cp backup schedule 7

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

    The proposed changes will be saved to the values.yaml configuration file in the cluster-mgmt repository upon confirmation.
  11. 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).

    cp backup schedule 8

    cp submit mr 3

    As a result, the request will change the state to confirmed. At the specified time, the MASTER-Build-cluster-mgmt Jenkins pipeline will be triggered. It applies the parameters of the specified configuration and creates backups in the backup repository.

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

    You can check the current status and execution result by clicking the CI link on the interface.

    cp backup schedule 9

    cp backup schedule 10

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. Log in to the Openshift console as the Platform administrator.

  2. Obtain an API token for cluster access via oc login:

    • Click Copy login command.

      cp backup schedule 11

    • Log in through Keycloak.

      cp backup schedule 12

    • Click Display Token.

      cp backup schedule 13

    • Copy the oc login API token.

      cp backup schedule 14

  3. Open a terminal/console, paste the obtained token, and execute the login.

    cp backup schedule 15

  4. Retrieve the list of backups using the command:

    velero get backups

    As a result, you will get a list of backups for central components, including their names, statuses, creation dates and times, as well as the retention period for these backups in the repository.

    cp backup schedule 16

    Note that the backup creation time is shown in the target time zone (UTC+2, Kyiv time), not the server time (UTC).

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