don't use resume tokens for purely local replication

This commit is contained in:
Jim Salter 2022-04-08 20:57:53 +00:00
parent d863c35cac
commit ec7858c1c7
1 changed files with 4 additions and 1 deletions

View File

@ -340,7 +340,10 @@ sub syncdataset {
my $receiveextraargs = "";
my $receivetoken;
if ($resume) {
# we need to make sure this isn't a local-only replication before trying to use resume tokens.
# trying to receive using -s on a stream sent from another dataset on the same host produces ZFS errors. (Discovered on 2022-04-08 on an Ubuntu 20.04 system)
if ($resume && ($sourcehost ne $targethost)) {
# save state of interrupted receive stream
$receiveextraargs = "-s";