Feature Request: zfs snapshots & send (sanoid/syncoid) functionality

Harmen

New Member
Oct 16, 2016
7
1
3
47
The Netherlands
anmd.org
Good afternoon,

Another thing I truly mis in PVE:
A way to make snapshots on a ZFS level and send them to another host.

Basically this:
https://github.com/jimsalterjrs/sanoid

Such a thing, with the zfs snapshots names so that they could be used for Windows Shadow Copy via Samba, would be awesome. :)
It would be a great way to create a backup of a single running PVE machine.

If you would implement Wake On Lan, to start a machine otherwise shut down, I'd be over the moon.
 
Another thing I truly mis in PVE:
A way to make snapshots on a ZFS level and send them to another host.

Basically this:
https://github.com/jimsalterjrs/sanoid

Just install it by hand and you're golden. I don't see why this should be integrated into PVE.

Such a thing, with the zfs snapshots names so that they could be used for Windows Shadow Copy via Samba, would be awesome. :)

This is completely up to you. In Samba, you can give a string that represents the format and you can create a cron entry that snapshots your desired datasets with the given format and then magically the snapshots appear in Windows.
 
Just install it by hand and you're golden. I don't see why this should be integrated into PVE.

Because it would be a great way to make proper, ZFS-based, backups.
The currently built-in backup mechanisms are VERY expensive, zfs snapshots are quite efficient. If would be great if you could simply sync the entire machine, via zfs, to another zfs machine (maybe another PVE machine).

This is completely up to you. In Samba, you can give a string that represents the format and you can create a cron entry that snapshots your desired datasets with the given format and then magically the snapshots appear in Windows.

That string is quite limited, so when making snapshots, you have to make sure SAMBA can actually be tuned to interpret that string properly.
 
Because it would be a great way to make proper, ZFS-based, backups.

Sure, If you ask people here, how they do their ZFS backup, you will get a lot of different answers, because there are a lot of ZFS send/receive/snapshot/retention tools out there . From the top of my head I could name at least 5 tools and I've never heard of the one you wrote. I also wrote a tool myself, because every tool I tried was missing some feature I really wanted and I think that there exist also others that did the same.

If would be great if you could simply sync the entire machine, via zfs, to another zfs machine (maybe another PVE machine).

That already exists and it is called PVE-zsync.

That string is quite limited, so when making snapshots, you have to make sure SAMBA can actually be tuned to interpret that string properly.

No, it's not. I'm using it for 3 years and it has been discussed for at least 5 in different blogs around the globe. It is also possible with BTRFS and dead simple. A few lines of samba configuration and a cron job and you're done.
 
Sure, If you ask people here, how they do their ZFS backup, you will get a lot of different answers, because there are a lot of ZFS send/receive/snapshot/retention tools out there . From the top of my head I could name at least 5 tools and I've never heard of the one you wrote. I also wrote a tool myself, because every tool I tried was missing some feature I really wanted and I think that there exist also others that did the same.

I know there are multiple tools, but I couldn't find one with the convenience like Sanoid.
Sanoid does 2 things:
- Make periodic ZFS snapshots
- Send them to another host

That already exists and it is called PVE-zsync.

Yeah, but that's CLI-only and it doesn't make and save periodic snapshots.

That's the whole point. :) There is no such mechanism in Proxmox to create periodic ZFS snapshots *and* send them to another host, let alone have such functionality configurable via the PVE GUI.

No, it's not. I'm using it for 3 years and it has been discussed for at least 5 in different blogs around the globe. It is also possible with BTRFS and dead simple. A few lines of samba configuration and a cron job and you're done.

Well no.
https://github.com/jimsalterjrs/sanoid/issues/5

Sanoid makes snapshots with names like this (not my system, taken from above example):

Code:
NAME                                                     USED  AVAIL  REFER  MOUNTPOINT
 zroot/data/shared@autosnap_2015-03-17_10:34:09_hourly       0      -   817G  -
 zroot/data/shared@autosnap_2015-03-17_10:34:09_monthly      0      -   817G  -
 zroot/data/shared@autosnap_2015-03-17_10:34:09_daily        0      -   817G  -

The whole issue is the latter _hourly _daily _monthly, that's where SMB goes wrong and as far as I know, you can't configure a "shadow:format" to include all. But if you can, please tell me because despite the fact that I'd still love to have such functionality in PVE (therefore this feature request), it would at least solve my problem for now. :)
 
I think it's more a backup feature. (backup using disk snapshot).
I was looking to implement this for ceph rbd too. (I'm currently doing it with custom scripts).

Maybe the main problem with zfs, is that if you have disk snapshot for backup, and also snasphot proxmox for vm, if you want to rollback a snapshot, you can only rollback to last snapshot. (so you need to delete all other snapshot, including backup snapshot, if you want to rollback to an older snapshot).
 
That is how zfs works. In LVM you can restore to any snapshot,that's why we are using it mainly.

Except if your snapshot ran out of space.

Well no.
https://github.com/jimsalterjrs/sanoid/issues/5

Sanoid makes snapshots with names like this

Okay, your snapshot tools creates wrongly named snapshots, choose a tool that does not so and that you can use the samba integration as other use for many, many years.

Maybe the main problem with zfs, is that if you have disk snapshot for backup, and also snasphot proxmox for vm, if you want to rollback a snapshot, you can only rollback to last snapshot. (so you need to delete all other snapshot, including backup snapshot, if you want to rollback to an older snapshot).

Yeah, that is unfortunately true.
Therefore, I use QCOW2 for complicated setups (even on ZFS) to be able to switch between snapshots. This QCOW2 solution also enables a tree snapshot structure instead of a linear one.

That's the whole point. :) There is no such mechanism in Proxmox to create periodic ZFS snapshots *and* send them to another host, let alone have such functionality configurable via the PVE GUI.

Are we talking about the same thing, because it exists and it is part of PVE:

Datacenter -> Host -> Replication

and it is documented here:

https://<yourhost>/pve-docs/chapter-pvesr.html#chapter_pvesr

And per definition it takes periodic ZFS snapshot AND send them to another PVE host AND it is configurable via the GUI (and of course CLI)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!