Filesystem-Level Backups with Velero¶
Create a backup¶
Set MSR4 to Read-Only Mode.
Before initiating the backup, set MSR4 to Read-Only mode to prevent new data from being written during the process, minimizing inconsistencies.
Log in to MSR4 as an administrator.
Navigate to Administration -> Configuration.
Under System Settings, enable the Repository Read-Only option.
Click Save to apply the changes.
Optional: Label Redis-Related Resources for Exclusion.
To avoid backing up ephemeral data, exclude Redis-related resources from the backup.
Label the Redis Pod:
kubectl -n <MSR4-NAMESPACE> label pod <REDIS-POD-NAME> velero.io/exclude-from-backup=true
Repeat the labeling process for the Redis PersistentVolumeClaim (PVC) and PersistentVolume (PV):
kubectl -n <MSR4-NAMESPACE> label pvc <REDIS-PVC-NAME> velero.io/exclude-from-backup=true kubectl -n <MSR4-NAMESPACE> label pv <REDIS-PV-NAME> velero.io/exclude-from-backup=true
Create a backup.
Create a Full Backup
Run the following command to create a full backup:
velero backup create msr4-full-backup --include-namespaces harbor --default-volumes-to-fs-backup --wait
Create an Incremental Backup
After the full backup, incremental backups happen automatically. They capture only the changes since the last backup:
velero backup create msr4-incremental-backup --include-namespaces harbor --default-volumes-to-fs-backup --wait
Complete backup by unsetting Read-Only mode.
Once the backup is complete, revert MSR4 to its normal operational state:
Navigate to Administration -> Configuration.
Under System Settings, disable the Repository Read-Only option by unchecking it.
Click Save to apply the changes.
Restore process¶
Restore a Full Backup
To restore from a Full Backup, use the following command:
velero restore create msr4-restore --from-backup msr4-full-backup
Restore an Incremental Backup
To restore from a Incremental Backup, use the following command:
velero restore create msr4-incremental-restore --from-backup msr4-incremental-backup