Hello Everyone,
I’ve been searching around how to backup VMs in TrueNAS 25.10 CE - and didn’t find anything reasonable… (nor any thread here in the forum)
Am I missing something? What’s the recommended way to backup VMs?
Is there something coming up in TrueNAS 26+?
Things I looked into:
- configuration
- seems to be backed up up with TrueNAS’ config backup - but restoring an individual VM’s configuration seems to be manual reconfiguring the machine…
- probably possible using virsh dumpxml - unsure if restore also works …
- disk images
(freezing the VM with virsh*, creating a zfs snapshot, thawing with virsh, doing the actual backup and finally removing the snapshot)- zsend
- seems to be fine, as long as you have a secondary ZFS based nas - and don’t want to do any cloud based backup
- for cloud based backup - using zsend with an image file as an intermediate target could be an option
- exporting the disk images to qcow2 and backing them up with kopia, borgbackup, …
would probably work… but adds quite some extra storage requirement (and I’m unsure if kopia’s/borg’s deduplication methods would still work… - exporting to raw would probably solve that part - adding even more storage needs) - backing up the block device with something like kopia, borgbackup, …
this seems to be a possible way to handle it… but I couldn’t find any well tested script to do that (could ask some AI to provide one… untested…) and at least with kopia this doesn’t seem to be an easy to do thing (for many VMs)
- zsend
Not working/possible (to my knowledge)
- virsh backup-begin - seems to be unsupported for zvol
- using qcow2 for the disks in TrueNAS
Ingo
p.s.: coming from Proxmox, I know, that VM functionality is somewhat limited in comparison… that’s fine - or at least accepted… but no backup seems to be the deal breaker for me.
*I’m aware, that TrueNAS tries to hide virsh… but I didn’t find corresponding functionality in TrueNAS api, closest I could find was: clone VM, backup, delete clone