https://rancher.com/ logo
Title
d

dry-island-5201

04/11/2023, 8:24 PM
Hi all, Is it possible to schedule VM backups in Harvester to an S3 or NFS storage?
p

prehistoric-furniture-82015

04/11/2023, 8:25 PM
d

dry-island-5201

04/11/2023, 8:29 PM
Yes. I am familiar with the docs, but i don't see anything about 'scheduling'. However, i found a way to do it (with help of ChatGPT): es, you can schedule VM backups in Harvester. Harvester uses Longhorn as its distributed block storage system, which provides snapshot and backup features for the volumes attached to VMs. To schedule VM backups, you can create recurring snapshot and backup schedules using Longhorn. Follow these steps to create a recurring backup schedule for a VM in Harvester: 1. Access the Harvester web interface by navigating to the Harvester cluster's IP address or domain name. 2. Click on the "Virtual Machines" tab in the left-hand menu. 3. Locate the VM you want to create a backup schedule for and click on its name to open the VM details page. 4. Click on the "Disks" tab to view the VM's disks and their associated Longhorn volumes. 5. Note the name of the Longhorn volume associated with the disk you want to back up (usually in the format
pvc-<UUID>
). 6. Now, access the Longhorn web interface. This can typically be accessed by navigating to
http://<Harvester_Cluster_IP>/dashboard/c/local/harvester-longhorn
or by finding the Longhorn app in the Rancher dashboard if you're using Rancher to manage your Harvester cluster. 7. In the Longhorn web interface, click on the "Volumes" tab in the left-hand menu. 8. Locate the volume associated with the VM disk you want to back up (using the volume name you noted earlier) and click on its name to open the volume details page. 9. In the volume details page, scroll down to the "Recurring Snapshot and Backup" section. 10. Click the "Add" button, and configure the backup schedule: 11. a. Choose the "Backup" option from the "Type" dropdown menu. 12. b. Set the desired schedule for the backup by defining the "Cron" expression. 13. c. Specify the number of backups to retain. 14. d. Click "Create" to save the backup schedule. Once you've completed these steps, Longhorn will automatically create backups of the specified VM disk according to the defined schedule. The backups will be stored in the configured backup target, such as an S3-compatible object storage service. Remember that you need to configure a backup target in Longhorn settings before you can create and store backups.
p

prehistoric-furniture-82015

04/12/2023, 7:24 AM
My appologies, i did not catch importance of "schedule" in your query. Looks like ChatGPT did better, but this is the kind of query chatgtp likes to hallucinate a lot. I'll check if it actually works and let you know, once we have set up offsite backups.
d

dry-island-5201

05/15/2023, 8:55 AM
Hi @prehistoric-furniture-82015, i was wondering if you found out if this actually works? I also found this thread: https://github.com/harvester/harvester/issues/572