• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

ZFS Backup

cepa

n00b
Joined
Jul 18, 2012
Messages
12
So here is the problem:

There is a server with two ZFS pools inside:

- tank0 - stripe-mirror + ssd zil + ssd l2arc - ~1.5TB of capacity
- tank1 - raid-z - ~6TB of capacity

tank0 is being used as a XenServer storage over NFS, and tank1 is dedicated for a backup

How to implement backup script/procedure that works with these conditions:
- dont have to turn off virtual machines kept on tank0
- tank0 is backed up daily (snapshots? incremental?)
- tank1 is used as a storage for tank0 backup
- if tank0 fails it is possible to recover cloned data trom tank1

Is it possible to do zfs snapshots and keep them on another pool or can i clone whole pool without having to turn off all vms?

Thanks in advance for any feedback
 
You could have a look at "zfs send" and "zfs receive"...

Basically you take a snapshot and send (zfs send) it to another pool (zfs receive), either on the same system or a remote system - after the first one you can use incremental updates.

You'd probably want to script it so it all happens automatically though!


http://docs.oracle.com/cd/E19963-01/html/821-1448/gbchx.html
 
Last edited:
I've got a similar setup using XCP (basically XenServer 6)... I use the xenbackup: https://code.google.com/p/xenbackup/

This creates a xen snapshot, and then exports it to an nfs or cifs share. Which in my case is a zfs pool... This gives me portable xva files, that are self contained backups.

1.5TB will take about 4 to 5 hours to backup with your setup, and will not cause any downtime at all.

So here is the problem:

There is a server with two ZFS pools inside:

- tank0 - stripe-mirror + ssd zil + ssd l2arc - ~1.5TB of capacity
- tank1 - raid-z - ~6TB of capacity

tank0 is being used as a XenServer storage over NFS, and tank1 is dedicated for a backup

How to implement backup script/procedure that works with these conditions:
- dont have to turn off virtual machines kept on tank0
- tank0 is backed up daily (snapshots? incremental?)
- tank1 is used as a storage for tank0 backup
- if tank0 fails it is possible to recover cloned data trom tank1

Is it possible to do zfs snapshots and keep them on another pool or can i clone whole pool without having to turn off all vms?

Thanks in advance for any feedback
 
You need to take snapshots and use zfs send/receive... and really frequency isn't a big deal. Eg you can do backups ever 5 minutes and it won't really affect performance. It almost seems smoother to do it more often... eg send 10MB of changes every 5 minutes vs sending 10GB once a night.
 
Thanks for replies,

zfs snapshots seems to be a simple solution however I'm wondering if making a snapshot of a running virtual machine from "outside" is a good idea, afterall its not just data on disk but also its current state.

I'm thinking of using xenserver builtin snapshots but the question is, if it is possible to make a snapshot once, export it and then later just add deltas to the backup instead of exporting whole clone of a vm every time.
 
Thanks for replies,

zfs snapshots seems to be a simple solution however I'm wondering if making a snapshot of a running virtual machine from "outside" is a good idea, afterall its not just data on disk but also its current state.

I'm thinking of using xenserver builtin snapshots but the question is, if it is possible to make a snapshot once, export it and then later just add deltas to the backup instead of exporting whole clone of a vm every time.

Not that I know of.
 
I know people that do ZFS snapshots of a live, running VM and sends it to another zpool. I dont know how well it works, and they dont say. But it should be easy to test how well it works? Just snapshot a VM, and send it to another server. Then boot the VM on the other server. Does it work or not?
 
It should. Keep in mind a snapshot of a running VM is pretty much like power off/power on of a physical PC. Should be okay most of the time with modern filesystems. This is how I backup, and since I do it late at night things are mostly quiescent.
 
what dan said. the data will be there but its like a hard power event. a journaled filesystem should be recoverable though but will likely require a chkdsk or fsck when the system reboots. this can be a big problem if say there was a major event and you have to run chkdsk/fsck on lots of VMs all at once.
 
Depending how complicated you want to go, you can script something where you run cli commands remotely on the esxi host like this:

do an esxi "hot-snap" of each guest (if tools are installed, it will quiesce the FS on each one)
do a zfs snap of that share
delete the snapshots via remote cli on the esxi host
 
Back
Top