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.cfg
should be exist in the backup target path<backup root>/harvester/vmbackups
- Delete the VM Backup
backup1
- File
default-backup1.cfg
should 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 filetmp
with contentfirst
in the VM - Backup
vm1
namedbackup1
- Append content
second
intotmp
file in the VMvm1
- Backup
vm1
namedbackup2
- Switch backup target to S3
- Delete backups and VM
vm1
in 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
backup1
tovm-b1
vm-b1
should contain file which was created in Step 4- Restore
backup2
tovm-b2
vm-b2
should 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
Ready
state for all backups. (this will take few mins depends on network connection) - Create image for backup
- The image MUST use the same
storageClassName
name as the backup created. storageClassName
can be found in backup’svolumeBackups
in the YAML definition.storageClassName
can be assigned bymetadata.name
when creating image via YAML. For example, when you assignmetadata.name
asimage-dgf27
, thestorageClassName
will 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