Manual backing up and restoring central components

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

1. Central components backup

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.

The platform administrator has the ability to create a backup of central components, which will be stored in a secure backup repository—MinIO.

Follow these steps to create a backup:
  1. Log into the OpenShift of the respective cluster.

  2. Copy the login command—click the Copy login command button under the user profile name.

    backup restore central copy login command

  3. After being redirected to the token display page, click the Display Token link.

    backup restore oauth display token

  4. Copy the access token to the OpenShift of the cluster into which the backup will be performed.

    backup restore openshift token

  5. Open Git Bash, paste the copied token, and press Enter.

    $ oc login --token=sha256~NyHYErh_JwJQаааааyIfmbbE-UY_Y3s_diQG422v9Rw --server=https://api.backup.mdtu-ddm.projects.epam.com:6443
  6. To check for existing backups, execute the following command:

    $ velero get backups
  7. To create a new backup, execute the following command:

    $ velero backup create control-plane-nexus-release1-4-backup-28-10 --include-namespaces control-plane-nexus --ttl 120h

    where:

    • control-plane-nexus-release1-4-backup-28-10 — is the folder name in the backup repository where the backup will be stored (the cluster name and backup creation date are provided for convenience);

    • control-plane-nexus — is the name of the central component for which the backup will be performed;

    • --ttl 120h — is the backup retention time.

  8. To verify if the backup has been successfully created, execute the following command:

    $ velero backup get

    backup restore central get

    where:

    • Status New — the backup request is new and is in the queue

    • Status InProgress — the backup creation is in progress

    • Status Completed — the backup has been created.

Deleting backup from storage

Execute the following command to delete a backup from storage:

$ velero backup delete control-plane-nexus-release1-4-backup-28-10
where the control-plane-nexus-release1-4-backup-28-10 is the name of the backup to be deleted.

2. Central components restoring

Before starting the process of restoring the central components, ensure that their backup has been created and these components have been removed.

Execute the following command to restore a central component for which the backup has been created:

$ velero restore control-plane-nexus --from-backup control-plane-nexus-backup-25-10

where:

  • control-plane-nexus — is the name of the central component to be restored;

  • backup control-plane-nexus-backup-25-10 — is the folder name in the backup repository where the backup is stored and from which the central component will be restored.