Backup & Restore a VM ZVol?

Status
Not open for further replies.

empmdk

Dabbler
Joined
Mar 19, 2017
Messages
15
I have a simple budget setup for my office using one SSD to run any VM's (mostly linux with no GUI) and a couple 2TB Red's in mirror for general storage. Is there any automated way of doing backups of the different ZVols or even entire volume to the storage mirror that would allow me to simply restore it if something goes wrong, like the SSD dying?

If not, any suggestions on doing automated backups within the VM's and how to restore it all?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I would suggest doing it via replication tasks.

Set periodic snapshots on your VM pool/datasets and use a replication task to send those snapshots to the pool on the WD Reds (you can specify a dataset that doesn't exist like tank/VMBackups as the destination, it will be created).

There's a good post out there to guide you on how to replicate to the localhost rather than an external system.

https://forums.freenas.org/index.php?threads/local-zfs-replication-task.15677/

Look at dusan's post for the clue to the ssh keys (need to modify the root user properties to have the key you will use).

To restore, you could do a zfs send | zfs recv in the opposite direction (I guess you will find a post covering that if needed).
 

empmdk

Dabbler
Joined
Mar 19, 2017
Messages
15
Thanks for the suggestion. Wouldn't the snapshots only contain recent changes to the data and not everything required for a complete restore?

EDIT: Never mind, I just tested moving a recursive snapshot from one volume to another and rolling it back. VM successfully booted without issue using the other volume.
 
Last edited:
Status
Not open for further replies.
Top