"zfs recv -vn < file" will check the integrity of the zfs stream in
file.  However, this is only a one-time check; if the data is
corrupted later the stream will not be recoverable.  You might
consider using something like par2 [1] to generate parity:
while true:
  zfs send f...@snap > file
  generate par2 at desired strength
  if zfs recv -vn < file succeeds:
    break
The reason for generating parity before checking if the recv succeeds
is then you can be reasonably sure the stream that the parity was
generated for is a valid stream.  Then store the stream and the parity
files together, and use the parity files to recover from media damage
over time.

Will

[1]: http://parchive.sourceforge.net/

On Wed, Sep 2, 2009 at 13:31, Dick Hoogendijk<d...@nagual.nl> wrote:
>
> Some time ago there was some discussion on zfs send | rcvd TO A FILE.
> Apart form the disadvantages which I now know someone mentioned a CHECK to
> be at least sure that the file itself was OK (without one or more bits that
> felt over). I lost this reply and would love to hear this check again. In
> other words how can I be sure of the validity of the received file in the
> next command line:
>
> # zfs send -Rv rp...@090902 > /backup/snaps/rpool.090902
>
> I only want to know how to check the integrity of the received file.
>
> --
> Dick Hoogendijk -- PGP/GnuPG key: 01D2433D
> + http://nagual.nl/ | SunOS 10u7 5/09 | OpenSolaris 2010.02 B121
> + All that's really worth doing is what we do for others (Lewis Carrol)
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
>
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to