Understood.

Could this be documented in the man-pages (maybe near the zfs-send “-t” option)?
Also I think, it would be “a nice to have feature”  if this throws an error 
either at the receiving or sending side.
(May be the sending options should be part of the transmission stream and the 
receiver croaks?)


Thank you!

Thilo


> On 4. Jul 2022, at 15:06, Alan Somers <[email protected]> wrote:
> 
> It's not a bug. The problem is that you can't combine zfs send -R and also 
> zfs recv -s .  The former creates several independent send streams.  But the 
> latter generates a token that will only resume a single stream. And there's 
> no way to fix the problem given ZFS's design. If the send gets interrupted,  
> you need to go check on the destination side to see which file datasets are 
> incomplete and resume all of them. 
> 
> On Mon, Jul 4, 2022, 5:53 AM thilo jeremias <[email protected] 
> <mailto:[email protected]>> wrote:
> Hello everyone,
> 
> I posted a question on ( 
> https://forums.freebsd.org/threads/zfs-replication-interrupted-and-resumed-missing-snapshots.85666/
>  
> <https://forums.freebsd.org/threads/zfs-replication-interrupted-and-resumed-missing-snapshots.85666/>
>  )
> Which I now think is a bug in zfs send/receive for 13.1-RELEASE
> 
> 
> Essentially, an interrupted & restarted receive does not create all snapshots 
> from the stream.
> 
> The following:
> #Interrupted transfer 
> zfs send -R "$D@final" | dd bs=10m count=200 | zfs recv -s "$D"_bad
> 
> #Resume transfer
> TOKEN="$(zfs get -H receive_resume_token   "$D"_bad  | cut -f 3)"
> zfs send -t "$TOKEN" | zfs recv -s "$D"_bad
> 
> #Good transfer
> zfs send -R "$D@final" | zfs recv -s "$D"_good
> 
> 
> Produces:
> NAME                          USED  AVAIL     REFER  MOUNTPOINT
> Backup/testset_good@initial  85.2K      -      128K  -
> Backup/testset_good@add100m  85.2K      -      100M  -
> Backup/testset_good@add300m  85.2K      -      400M  -
> Backup/testset_good@del100m  85.2K      -      300M  -
> Backup/testset_good@del300m     0B      -      128K  -
> Backup/testset_good@final       0B      -      128K  -
> NAME                         USED  AVAIL     REFER  MOUNTPOINT
> Backup/testset_bad@initial  85.2K      -      128K  -
> Backup/testset_bad@add100m     0B      -      100M  -
> 
> Which is not correct since it misses the snapshots from the original stream 
> (“good”)
> 
> Can this be reproduced by anyone else?
> 
> 
> Thilo
> 
> 
> -------------------------------
> Dipl. Ing. Thilo Jeremias
> Hauptstraße 11
> 35466 Rabenau
> 
> T: +49 15782492240
> 
> 

Reply via email to