The following steps are used to setup minio and velero which are used to backup the required data.
-
Go to the installer/microk8s directory
-
Edit the env.sh file and customize the Velero settings
Setting
Description
VELERO_SCHEDULE_CRON_EXPR
The CRON Expression used to schedule backups.
Default = 0 7 * * *
This is daily at 7 AMVELERO_BACKUP_RETENTION
The # of hours the backup will be saved by Velero.
Default = 720h0m0s
-
Install minio into the cluster by running ‘./install-minio.sh <minio-password> <minio-storage-path>’. Example, ‘./install-minio.sh mpass1234 /home/user/minio-store’
-
The minio-password must be 8 characters or longer. The minio-storage-path needs to exist before running the command.
-
Minio does not allow the minio-storage-path to be on the root disk of the host.
-
-
Install Velero into the cluster by running ‘./install-velero.sh <minio-password>’
-
When the script completes, the following message is displayed.
To get the velero status, the microk8s needs to be added to the beginning of the command to see status. Example: ‘microk8s kubectl logs deployment/velero -n velero’
-
Run the following command to ensure that Velero pod is started, run ‘microk8s kubectl get pods -n velero’
-
The installation of Velero also creates an initial backup. To see all backups from the install/microk8s directory, run './velero backup get'. This will list all backups, their statuses, and retention policies.
-
Additional backups will be taken based on the ‘VELERO_SCHEDULE_CRON_EXPR’. To create a backup manually, run './velero backup create <name>’
-
To preserve the backup files on a second server, the contents of the minio-storage-path need to be copied to a backup host.
-
To automate this process, edit the installer/microk8s/backup-tar-scp.sh
-
Set MINIO_STORE to the minio-storage-path
-
Set the BACKUP_HOST, BACKUP_HOST_USER, BACKUP_HOST_PATH to a secondary server that
If the minio-storage-path is shared from a different host in the first place (NFS, SAMBA), then it’s automatically protected from a microk8s host failure.
-
-