Ref: https://github.com/harvester/harvester/issues/988
Verify Items
- Metadata should be removed along with VM deleted
- Metadata should be synced after backup target switched
- Metadata can be used in new cluster
Case: Metadata create and delete
- Install Harvester with any nodes
- Create an image for VM creation
- Setup NFS/S3 backup target
- Create a VM, then create a backup named
backup1 - File
default-backup1.cfgshould be exist in the backup target path<backup root>/harvester/vmbackups - Delete the VM Backup
backup1 - File
default-backup1.cfgshould be removed
Case: Metadata sync after backup target changed
- Install Harvester with any nodes
- Create an image for VM creation
- Setup NFS backup target
- Create VM
vm1, then create filetmpwith contentfirstin the VM - Backup
vm1namedbackup1 - Append content
secondintotmpfile in the VMvm1 - Backup
vm1namedbackup2 - Switch backup target to S3
- Delete backups and VM
vm1in the dashboard - Backup Files should be kept in the former backup target
- Swithc backup target back
- Backups should be loaded in Dashboard’s Backup page
- Restore
backup1tovm-b1 vm-b1should contain file which was created in Step 4- Restore
backup2tovm-b2 vm-b2should contain file which was modified in step 6- Repeat Step 3 to Step 16 with following Backup ordering
- S3 -> NFS
- NFS -> NFS
- S3 -> S3
Case: Backup rebuild in new cluster
- Repeat Case: Metadata create and delete as cluster A to generate backup data
- Installer another Harvester with any nodes as cluster B
- setup backup-target which contained old backup data
- Backup Targets in Backups should show
Readystate for all backups. (this will take few mins depends on network connection) - Create image for backup
- The image MUST use the same
storageClassNamename as the backup created. storageClassNamecan be found in backup’svolumeBackupsin the YAML definition.storageClassNamecan be assigned bymetadata.namewhen creating image via YAML. For example, when you assignmetadata.nameasimage-dgf27, thestorageClassNamewill be named aslonghorn-image-dgf27
- The image MUST use the same
- Restore backup to new VM
- VM should started successfully
- VM should contain those data that it was taken backup