PVE-Zsync and local backup: Backup different disks

toninho

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



I have a proxmox VM with Windows Server and 3 disks, setup is as follows:

  • Disk 0: OS disk – 200Gb - Backup enabled on proxmox
  • Disk 1: Data disk – 1,5Tb - Backup enabled on proxmox
  • Disk 2: Other Windows PC backups – 1,5 Tb - Backup not enabled on proxmox
Currently I have a USB harddisk passthrough that does Windows Server backup of all data (That would be the onsite backup)



Also, I have set up PVE-Zsync to an offsite proxmox Machine (Not on the same node as they’re connected through Openvpn).



Since I only have backup enabled on disks 0 and 1, PVE-Zsync only syncs those disks (Perfect, is what I want).



So, I have covered onsite data backup + offsite backup. Problem is, if my local proxmox machine fails, I have no recent local VM backup to fast recover the VM. If I enable local backup to a local NAS it would backup disks 0 and 1, but since disk 1 is 1,5Tb, and backups are not incremental, it is not feasible with my 1Gb local network.



Is there any way to set the VM to only backup disk 0 to the local NAS while keeping disks 0 and 1 being synced through PVE-Zsync?



This way if the local proxmox fails I can fast recover the OS disk (disk 0) while I spend 2 days sending the disk 1 data back from the offsite pve-zsync backup.



Thanks for your help
 
Hi,

Each disk has a check-box(in the hardware definition of your VM, using Advanced for any disk) for Backup. So you can put a check mark for your unwanted backup("no backup") for any vDisk except disk 0. So no a next backup time only disk 0 is backup.

Good luck / Bafta!
 
Hi

Thanks for the answer. I have it set up like this already. But Backup settings affects both local Backups and pve-zsync.

So if I disable Backup for disk 1 it also disables zsync for that disk.

What I would like to know is if there is a way to have a different disk Backup setting for proxmox built in Backup and another for pve-zsync

Thanks!
 
Are you sure? In my case, the disk not marked as backup drive don't get synced. Is it just luck?

Pve-zsync settings are vm, you don't specify which disks sync and which don't.
And I have a real case scenario where it syncs 2 drives every day and leaves one out. Which casually are the ones marked to backup
 
show your output for:

pve-zsync status

Output for remote proxmox (The one that does the pve-zsync):
Code:
root@vdm:~# pve-zsync status
SOURCE                   NAME                     STATUS
192.168.XX.XX:200        RT3905                   ok
192.168.XX.XX:201        WHS2016               ok
192.168.XX.XX:202        HAL159                  ok

Windows machine (The one that backs-up two disks) is VM 201 - WHS2016)

Output for zfs list-t snapshot on remote proxmox
Code:
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-11_03:00:02  1.88G      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-12_03:00:01   621M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-13_03:00:01   220M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-14_03:00:01   188M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-15_03:00:01   186M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-16_03:00:01   208M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-17_03:00:01     0B      -      200G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-13_03:00:01  81.4M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-14_03:00:01  31.0M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-15_03:00:01  23.6M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-16_03:00:01  36.9M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-17_03:00:01     0B      -      953G  -

I haven't copied the output for VMs 200 and 202 (They only have one disk each)

Setting for pve-zsync on remote proxmox
pve-zsync sync --source 192.168.XX.XX:201 --dest newpool/backup --name WHS2016 --maxsnap 7 --method ssh --source-user root --dest-user root --verbose
Cron job does the sync every day at 3am

Disks settings for VM 200.conf on local proxmox:
Code:
scsi0: bignvme-vm:vm-201-disk-0,size=200G
scsi2: sixpack-vm:vm-201-disk-1,cache=writeback,discard=on,size=1536G
scsi3: sixpack-vm:vm-201-disk-2,backup=0,cache=writeback,discard=on,size=1524G

Only difference among settings for the disks is the backup=0. Disk 0 and 1 are even on different zfs pools and get synced without problems.
 
Just to double check that I was right on the behaviour, I have disabled backup for disk 1.

I have then done a local backup of the VM, which has only been of disk 0. As it's supposed to be.

Once finished, I've done pve-zsync from remote proxmox (With settings form the post above), and it has avoided disk 1 completely.

Output for zfs list -t snapshot:
Code:
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-12_03:00:01  2.06G      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-13_03:00:01   220M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-14_03:00:01   188M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-15_03:00:01   186M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-16_03:00:01   208M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-17_03:00:01   172M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-17_13:24:36     0B      -      200G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-13_03:00:01  81.4M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-14_03:00:01  31.0M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-15_03:00:01  23.6M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-16_03:00:01  36.9M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-17_03:00:01     0B      -      953G  -

After that, I've enabled backup for disk 1 and done pve-zsync,
Output for zfs list-t snapshot as follows:
Code:
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-13_03:00:01   979M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-14_03:00:01   188M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-15_03:00:01   186M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-16_03:00:01   208M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-17_03:00:01   172M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-17_13:24:36  8.79M      -      200G  -
newpool/backup/vm-201-disk-0@rep_WHS2016_2020-06-17_13:29:59     0B      -      200G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-14_03:00:01  81.9M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-15_03:00:01  23.6M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-16_03:00:01  36.9M      -      954G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-17_03:00:01  17.4M      -      953G  -
newpool/backup/vm-201-disk-1@rep_WHS2016_2020-06-17_13:29:59     0B      -      953G  -

You can see that for disk 0 there's a snapshot synced thorugh pve-zsync at 13:24:36 that's missing for disk 1 (Which then had backup disabled).

After enabling back the backup for disk 1, there's a snapshot for both disks at 13:29:59
 
But I want to do it the other way around, pve-zsync for disks 0 and 1.

So I should set pve-zsync to sync those 2 datasets (vm-201-disk-0 and vm-201-disk-1) instead of the entire VM?

And then set backup=0 for disk 1?

So, VM-disk backup and pve-zsync settings are related and there's not a way to enable a VM-disk setting for pve-zsync not related to the VM-disk backup setting?

By the way, thanks a lot for your help!! I didn't know I could pve-zsyncs datasets instead of VM