PVE-Zsync: Initial sync via USB drive

tan

Active Member
Feb 1, 2018
2
1
43
55
Hi,

I'm using PVE-Zsync for offsite backup. Both are on Proxmox 5.1. It worked as expected but the the initial sync is very slow via the WAN.
I tried to speed it up by creating the snapshot, sending it to the external hard drive, bringing the hard drive to the remote office and restoring the snapshot.

When creating the PVE-Zsync job with this command
pve-zsync create --source 192.168.1.6:107 --dest 192.168.79.85:rpool/data --verbose --maxsnap 2 --name syncvm107

I have a following error:

GET ERROR:
cannot receive new filesystem stream: destination has snapshots (eg. rpool/data/vm-107-disk-1)
must destroy them to overwrite it

On the offsite backup server:
zfs list -t snapshot:
NAME USED AVAIL REFER MOUNTPOINT
rpool/data/vm-107-disk-1@rep_syncvm107_2018-01-31_19:30:01 0B - 2.47G -

For sure the destination has a snapshot since I put it there. I would like to know what I'm missing to get it works ?

Thank you.

Tan
 
Hi,

You have to sync once manually to have the same timestamps.
 
Thank you for the hint. It works now by giving the snapshot the same name and timestamps.
I can now make the initial sync without syncing the whole VM through the WAN.

Here are the summary of my steps, just in case someone else need it.

On the source server:
1) Mount USB hard drive

2) Create snapshot with a name and timestamp. Example:
zfs snapshot tank/vmdata/vm-107-disk-1@rep_syncvm107_2018-02-01_14:08:01

2) copy it to the external hdd
zfs send tank/vmdata/vm-107-disk-1@rep_syncvm107_2018-02-01_14:08:01 > /media/vm107.zfs

3) umount /media

4) Bring the USB hard drive to the remote office

5) Mount the USB hard drive to the remote server

6) Restore the snapshot with the same name and timestamp. Example:
zfs receive rpool/data/vm-107-disk-1@rep_syncvm107_2018-02-01_14:08:01 < vm107.zfs

7) Create the pve-zsync job on the source server
pve-zsync create --source 192.168.1.65:107 --dest 192.168.79.71:rpool/data --verbose --maxsnap 2 --name syncvm107 --limit 512 --skip


Tan
 
  • Like
Reactions: killmasta93