Central components backup and restoring
1. Central components backup
The platform administrator has the ability to create a backup of central components, which will be stored in a secure backup repository (for example, Minio).
To do this, follow these steps:
-
Log into the OpenShift of the respective cluster.
-
Copy the login command—click the Copy login command button under the user profile name:
-
After being redirected to the token display page, click the
Display Token
link:
-
Copy the access token to the OpenShift of the cluster into which the backup will be performed:
-
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
-
To check for existing backups, execute the following command:
$ velero get backups
-
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.
|
-
To verify if the backup has been successfully created, execute the following command:
$ velero backup 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.
|
Deletion of backup from storage
To delete a backup from storage, execute the following command:
$ velero backup delete control-plane-nexus-release1-4-backup-28-10
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. |
To restore a central component for which the backup has been created, execute the following command:
$ 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.
|