zfs-replicate icon indicating copy to clipboard operation
zfs-replicate copied to clipboard

Cloned dataset wants to receive to original.

Open tschettervictor opened this issue 8 months ago • 9 comments

Greetings,

I just ran into this. Try this...

Create a dataset, run the script here a few times to verify it is backing up, then clone that dataset to another one with zfs send | zfs receive and attempt to run it again.

What I found is that it replicated the old one just fine, but when it tried to do the cloned one, it receives into the old dataset, which obviously causes it to fail.

Would this have anything to do with the way the script handles things?

Mar 04 08:41:15 zfs-replicate.sh[43190]: receiving incremental stream of tank/extensions/bastille/jails/desktopstreaming@autorep-03042025_1741102754 into backup/tank/extensions/bastille/jails/desktopstreaming@autorep-03042025_1741102754
Mar 04 08:41:16 zfs-replicate.sh[43190]: received 312B stream in 1 seconds (312B/sec)
...
Mar 04 08:41:23 zfs-replicate.sh[43190]: receiving incremental stream of tank/extensions/bastille/jails/desk2@autorep-03042025_1741102754 into backup/tank/extensions/bastille/jails/desktopstreaming@autorep-03042025_1741102754
Mar 04 08:41:23 zfs-replicate.sh[43190]: cannot restore to backup/tank/extensions/bastille/jails/desktopstreaming@autorep-03042025_1741102754: destination already exists
Mar 04 08:41:24 zfs-replicate.sh[43190]: destroying snapshot cmd=/usr/bin/ssh 192.168.1.132 /sbin/zfs destroy -r tank@autorep-03042025_1741102754
Mar 04 08:41:25 zfs-replicate.sh[43190]: deleting lockfile /tmp/.replicate.snapshot.lock
Mar 04 08:41:25 zfs-replicate.sh[43190]: deleting lockfile /tmp/.replicate.send.lock

Notice it is trying to receive 'desk2' into 'desktopstreaming'

@aaronhurt

tschettervictor avatar Mar 04 '25 15:03 tschettervictor