Instance backups #9347
Replies: 6 comments 3 replies
-
@pcfriek1987 have you considered Dell NetWorker? although snapshots are not really backups would it help you if you store the snapshots in the remote zone as well ? |
Beta Was this translation helpful? Give feedback.
-
Are you interested in saving the VM's memory as well as the volume's data, or only the volume's data? |
Beta Was this translation helpful? Give feedback.
-
On a normal backup you wouldn't save the memory either, so the memory is of no concern to me. @rajujith what do you mean with remote zone? I only looked at Dell networker briefly, just now, do you have any experience with it? |
Beta Was this translation helpful? Give feedback.
-
Great, CloudStack already has the built-in solution for VM's volume backups. If you want to backup your VMs volumes, you need to set According to IBM: "Backup and restore refers to technologies and practices for making periodic copies of data and applications to a separate, secondary device and then using those copies to recover the data and applications." 1 So how do we apply this on CloudStack? Your VM's volumes are always on the primary storage. When you create a snapshot, you copy all the volume's data to a secondary storage area (assuming Furthermore, depending on how you want to set it up, using secondary storage selectors (see #7659), you could have a single secondary storage that contains all of your volume snapshots (your backups) in a separate datacenter, and keep your templates/ISOs in a secondary storage that is inside the 'main' datacenter, so that the files you use frequently (templates/ISOs) are faster to access, while the backups (volume snapshots) are on another storage in case of a disaster on your 'main' datacenter. Moreover, as @rajujith said, #7873 added the possibility of keeping redundant copies of your snapshots on various secondary storages, giving you even more safety. As for the periodic part, you can create snapshot policies, that will take periodic snapshots of your volumes. I hope you can see how volume snapshots are backups, at least using the Footnotes |
Beta Was this translation helpful? Give feedback.
-
Hi @JoaoJandre I didn't know that was possible, and it seems quite interesting, will need to look at that, I thought you could have only one Secondary storage, which for me is an NFS mount on the management server. But how does it work? I can see there is a piece of documentation (https://docs.cloudstack.apache.org/en/latest/adminguide/storage.html#direct-resources-to-a-specific-secondary-storage), but that is a bit too vague for me on how to set it as it just talks about this is the rule to set it, but not how they got there in the first place, is there an example of how to do this? For me it would be about number 3 (Direct snapshot of volumes with the KVM hypervisor to a specific secondary storage). |
Beta Was this translation helpful? Give feedback.
-
Hello, pcfriek1987 I apologize for lack of clarity in the section Direct resources to a specific secondary storage, currently, you can only manage the secondary storage selectors through API, which is easier through CloudMonkey; it is planned to add the management of this feature to the UI in the future, simplifying its usage. For now, you will need to use the APIs createSecondaryStorageSelector, listSecondaryStorageSelectors, removeSecondaryStorageSelector and updateSecondaryStorageSelector, which are available on So, for example, if you want to direct snapshots to a specific secondary storage, like you mentioned, you'll need to create the following rule: if (snapshot.hypervisorType === 'KVM') {
'7cdd9941-5bb5-4717-9afb-8cf803340253';
} To create this rule through the API Note that the heuristic rule was formatted to a one string JS script (lab) 🐱 > create secondarystorageselector name="kvm-snapshots" description="Selector for directing snapshots to an especific secondary storage" zoneid=7cdd9941-5bb5-4717-9afb-8cf803340253 purpose=SNAPSHOT heuristicrule="if (snapshot.hypervisorType === 'KVM') { '7832f261-c602-4e8e-8580-2496ffbbc45d'; }"
{
"heuristics": {
"created": "2024-07-09T19:49:07+0000",
"description": "Selector for directing snapshots to an especific secondary storage",
"heuristicrule": "if (snapshot.hypervisorType === 'KVM') { '7832f261-c602-4e8e-8580-2496ffbbc45d'; }",
"id": "47628716-4ac3-42f4-bbdb-c3afb9a09e24",
"name": "kvm-snapshots",
"purpose": "SNAPSHOT",
"zoneid": "7cdd9941-5bb5-4717-9afb-8cf803340253"
}
} However, this only directs all snapshots for the hypervisor KVM to the specific, other types of secondary storage resources (such as ISOs, templates and volumes) can still be allocated to this storage. Therefore, if you want to dedicate a secondary storage to only store snapshots, you'll need to create a selector for the remaining resource types filtering the desired secondary storage. Unfortunately, this feature expects that the JS output is a valid secondary storage UUID, therefore, you'll need to shuffle the UUIDs through the JS script. I will try to improve this part of the feature, to simplify the dedication of a resource to a specific secondary storage. |
Beta Was this translation helpful? Give feedback.
-
As I'm still with this backup part in my head.
And that where all the options possible (outside of starting to write your own, which well since I'm not a coder would also just be a whole lot of money).
While you can create disk snapshots my opinion is that they are not really backups.
While it seems the the internal names don't change after an instance has been created, the i- names, so in theory you can create a backup from a KVM and move it, how would you restore it? Since the names are in a database.
I'm sure I'm not the only one having this issue :) Even with a replicated ceph setup you should want backups.
So how do other people create backups on Cloudstack?
Beta Was this translation helpful? Give feedback.
All reactions