oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
607 stars 137 forks source link

How best to handle remote repository after a zfs rollback? #469

Closed kevdogg closed 4 years ago

kevdogg commented 4 years ago

I was doing some testing this afternoon on my ZFS machines:

  1. Arch linux VM with ZOL
  2. FreeNAS

I made a number of snapshosts on the client (arch linux) using:

znapzend --debug --runonce tank/data/home

which then set snapshot to FreeNAS. I then performed a rollback on the client and was curious how znapsend would handle this situation.

I got the following error complaining about no common found on source and destination:

[Sat Feb  1 15:53:58 2020] [debug] sending snapshots from tank/data/home/kevdog to root@10.0.1.197:tank/backups/zfs_backup/archZFSProxy/home/kevdog
# zfs list -H -o name -t snapshot -s creation -d 1 tank/data/home/kevdog
# ssh -o batchMode=yes -o ConnectTimeout=30 root@10.0.1.197 zfs list -H -o name -t snapshot -s creation -d 1 tank/backups/zfs_backup/archZFSProxy/home/kevdog
[Sat Feb  1 15:53:58 2020] [warn] ERROR: snapshot(s) exist on destination, but no common found on source and destination clean up destination root@10.0.1.197:tank/backups/zfs_backup/archZFSProxy/home/kevdog (i.e. destroy existing snapshots)

What's the best work around for this problem?

oetiker commented 4 years ago

you have to remove the excess snapshots on the destination by hand