[pve-devel] applied: [zsync] fix: check for incremental sync snapshot.

Wolfgang Link w.link at proxmox.com
Thu Mar 19 13:39:08 CET 2020



> On March 19, 2020 1:05 PM Thomas Lamprecht <t.lamprecht at proxmox.com> wrote:
> 
>  
> On 3/19/20 11:51 AM, Fabian Ebner wrote:
> > Hi,
> > this does fix an issue when the receiving side has the most recent snapshot, but not the 'old_snap' one. And of course testing for 'last_snap' is correct, since that one is the relevant one for the incremental sync. With that:
> > 
> > Reviewed-By: Fabian Ebner <f.ebner at proxmox.com>
> > Tested-By: Fabian Ebner <f.ebner at proxmox.com>
> 
> With that applied, thanks to all.
> Wolfgang you missed your signed-off-by (FYI).

Will do the next time.

> > 
> > Some ideas for further improvements:
> > * If on the destination there are older snapshots but not most recent one, pve-zsync tries to do a full sync and fails with: "destination has snapshots". One could get the list of snapshots from the destination, the list of snapshots from the source and use the most recent common one as the starting point for an incremental sync (and fail if both sides do have snapshots but no match).
> > * Knowing the list of snapshots for the destination could also be used to prevent issuing a useless remote 'zfs destroy' when the snapshot to be deleted does not exist for the destination.
> 
> Sounds reasonable, IMO.

I've already thought about it, but I wouldn't do it automatically.
More Like this 
pve-zsync cleanup: Removes all snapshots with rep_ on behalf of the source host that are not available on the target.
pve-zsync fixSync: searches for the last common synchronization point and removes all subsequent ones at the destination

One problem with automatic resolution is that multiple replications can accidentally delete snapshots.
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list