From ec7858c1c7db24a445212b007bc84b52eae664b4 Mon Sep 17 00:00:00 2001 From: Jim Salter Date: Fri, 8 Apr 2022 20:57:53 +0000 Subject: [PATCH] don't use resume tokens for purely local replication --- syncoid | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/syncoid b/syncoid index 3f112de..a6d2c3e 100755 --- a/syncoid +++ b/syncoid @@ -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";