pve-zsync maxsnap help

toninho

New Member
Apr 15, 2020
11
0
1
46
Hi!

I would like to ask for some help. I'm no IT guy and I have a home proxmox setup mainly to keep family data in a Windows Server VM.

I have two proxmox servers in two different locations conncted through openvpn.

Server1 does all the job and has 3 vms.
It has two zfs pools:
Pool 1 (rpool): 1 500gb ssd disk (Waiting to get another one so I can mirror it) with VM OS data (RT3905 disk0 - WHS2016 disk1 and HAL159 disk0)
Pool 2 (sixpack): 6x2tb in raidz2 with one VM storage data (Only WHS2016 disk0)

Server2 has a pfsense vm and its main purpose is to back up (with pve-zsync) all Server1 data
It has a lvm disk with pfsense VM data
It has one zfs pool: 4x4tb in raidz2

So in order to backup Server1 offsite to Server2 the fastest and easiest way I've found is pve-zsync. I have it set up from Server2 so it does the following commands once a day:

pve-zsync sync --source Server1-IP:200 --dest newpool/backup --name RT3905 --maxsnap 7 --method ssh --source-user root --dest-user root --verbose
pve-zsync sync --source Server1-IP:201 --dest newpool/backup --name WHS2016 --maxsnap 7 --method ssh --source-user root --dest-user root --verbose
pve-zsync sync --source Server1-IP:202 --dest newpool/backup --name HAL159 --maxsnap 7 --method ssh --source-user root --dest-user root --verbose

It all works perfectly, I have a daily email withe the results and it all works ok except one thing that I don't know how to solve: The number of snapshots it stores!

For VM1 it stores 7 snapshots of disk 0 (64gb disk)
For VM3 it stores 7 snapshots of disk 0 (32gb disk)

But for VM2 it stores 7 snapshots of disk 1 (160gb) but only 1 snapshot of disk 0 (2,4tb)

So, for all vm-disks stored on Pool1@Server1 it does 7 snapshots but for the vm-disk stored at Pool2@Server1 it only stores the daily snapshot.

If I list zpool history on server1 I get the following for Pool1:

2020-04-15.03:00:13 zfs snapshot rpool/vmdata/vm-201-disk-1@rep_WHS2016_2020-04-15_03:00:01
2020-04-15.03:40:47 zfs destroy rpool/vmdata/vm-201-disk-1@rep_WHS2016_2020-04-08_03:00:01
2020-04-15.12:00:12 zfs snapshot rpool/vmdata/vm-200-disk-0@rep_RT3905_2020-04-15_12:00:01
2020-04-15.12:00:18 zfs destroy rpool/vmdata/vm-200-disk-0@rep_RT3905_2020-04-08_12:00:01
2020-04-15.16:00:12 zfs snapshot rpool/vmdata/vm-202-disk-0@rep_HAL159_2020-04-15_16:00:02
2020-04-15.16:01:00 zfs destroy rpool/vmdata/vm-202-disk-0@rep_HAL159_2020-04-08_16:00:01

So it's destroying last week snapshot for all 3 disks

But for Pool2:

2020-04-15.03:41:05 zfs snapshot sixpack/vmdata/vm-201-disk-0@rep_WHS2016_2020-04-15_03:00:01
2020-04-15.06:42:20 zfs destroy sixpack/vmdata/vm-201-disk-0@rep_WHS2016_2020-04-14_03:00:01

So it's destroying yesterday's snapshot

I dont' know if it's a storage availabilty issue (I think I should have enough free space) or if some setup at pool level but I'm unable to fix it.

And, of course, data is what I need to keep for most time, so the disk I'm only keeping 1 day history is the one I should be keeping for 7 days (At least!)

Any ideas how to fix it or where / what should I be looking for that I'm missing?

Thanks in advance for your help!
 
Also, if you have another idea to backup one server to another off-site server that's easier or better than pve-zsync I am open to try it.

The idea is to copy and keep seven days history, so if something goes wrong I can roll-back

Could storage replication be an option?
 

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!