Backing Up VMs With Multiple Hosts and Multiple TruNAS Servers

BadAt IT

Cadet
Joined
Dec 27, 2023
Messages
5
I am trying to figure out how I can get a tertiary TruNAS server to take backups of the VMs that live on other TruNAS servers. The environment is being tested as a sudo HCI that focuses heavily on FT. The environment is as follows:

Host 1 (Primary) Has ESXI with TruNAS core installed as VM on its own boot ssd. Mounted 5 2 TB nvme drives via HBA to TruNAS and created iSCSI share for Primary VM data store. Running a handful of server 2022 test VMs on said data store

Host 2 (Secondary) Has ESXI with TruNAS core installed as VM on its own boot ssd. Mounted 6 2 TB ssd drives via HBA to TrunAS and creatd iSCSI share for secondary VM data store. Installed Vcenter on this data store and created cluster with all three hosts. Secondary data store allows system to run FT and handle live migration for maintenace.

Host 3 (Backup and File) Has ESXI with TruNAS core installed as VM on its own boot ssd. Has 8 6tb HDD to run as SMB share as well as system backups.

I am new to TruNAS but could not find anything specefic in the forums to this, but it very well could be user ignorance. What I am trying to accomplish is to have the backup and file server take vmware snapshots of the other hosts VMs. I have been able to create and run a VM snapshot but as I understand VM snapshots get stored on to the ZFS volume that the VM data store is on? No data is ever saved to the remote data set I am trying to save snapshots to. When I run the backup on the hosts I can see ESXI creating and deleting the snapshots but the data is nowhwere to be found?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I have been able to create and run a VM snapshot but as I understand VM snapshots get stored on to the ZFS volume that the VM data store is on? No data is ever saved to the remote data set I am trying to save snapshots to.
A snapshot doesn't get "saved" anywhere other than the pool where it is taken.

When I run the backup on the hosts I can see ESXI creating and deleting the snapshots but the data is nowhwere to be found?
It seems you're misunderstanding what a snapshot is.

Snapshots are a point-in-time copy of the allocation table for the blocks in use for the object you performed the snapshot against... the data in those blocks is wherever it was in the first place (and the snapshot ensures that those blocks remain untouched and available for use exactly as they were at that instant the snapshot was taken).

If you want to move the contents of a snapshot to a remote system, a replication task can do that (or do it with a script involving zfs send | zfs recv). The docs are clear on how to set a replication task, but that applies primarily to datasets, not ZVOLs.

To move ZVOLs, you need to use the zfs send | zfs recv method.
 

BadAt IT

Cadet
Joined
Dec 27, 2023
Messages
5
Thank you for your reply, I was indeed confused. I was thinking that they functioned similar to Synology's active backup for business. Is there a feature similar to active backup for business that can be leveraged on TruNAS for live vm backups?
 
Top