Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2019 23:39:40 +0700
From:      Victor Sudakov <vas@mpeks.tomsk.su>
To:        freebsd-questions@freebsd.org
Subject:   Re: saving "zfs send" to a Windows host
Message-ID:  <20190424163940.GA36280@admin.sibptus.ru>
In-Reply-To: <239425b6-a313-3fb8-bc26-321741a4a4d2@gmx.com>
References:  <20190423054243.GA4659@admin.sibptus.ru> <201904230926.36122.dr.klepp@gmx.at> <239425b6-a313-3fb8-bc26-321741a4a4d2@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Nikos Vassiliadis wrote:
> 
> Using ssh as transport is fine. I'd advice against saving zfs streams to
> a non-ZFS filesystem because you will have no way to ensure that your
> stream is OK. A single bit flip will render the stream unusable and you
> will only discover this when you try to receive the stream.

The integrity of the backup cannot be checked with "zfs receive -n",
that is true, but to some extent it can be checked with zstreamdump (or at
least I hope so).

For example, where /var/tmp/bad.zfs is the intentionally corrupt backup:

root@vas:~ # zfs receive -nv d02/kaban < /var/tmp/bad.zfs
would receive full stream of zroot/var/mail@test into d02/kaban@test

root@vas:~ # zfs receive -v d02/kaban < /var/tmp/bad.zfs
receiving full stream of zroot/var/mail@test into d02/kaban@test
cannot receive new filesystem stream: checksum mismatch or incomplete stream

root@vas:~ # zstreamdump < /var/tmp/bad.zfs 
BEGIN record
        hdrtype = 1
        features = 4
        magic = 2f5bacbac
        creation_time = 5cc08e0f
        type = 2
        flags = 0x4
        toguid = 2074530c7350e1e2
        fromguid = 0
        toname = zroot/var/mail@test
invalid checksum
Incorrect checksum in record header.
Expected checksum = 1863eeb012/1c685a9e2c25/16eef022635779/e575d4bbf565c75
SUMMARY:
        Total DRR_BEGIN records = 1
        Total DRR_END records = 0
        Total DRR_OBJECT records = 3
        Total DRR_FREEOBJECTS records = 1
        Total DRR_WRITE records = 0
        Total DRR_WRITE_BYREF records = 0
        Total DRR_WRITE_EMBEDDED records = 0
        Total DRR_FREE records = 2
        Total DRR_SPILL records = 0
        Total records = 7
        Total write size = 0 (0x0)
        Total stream length = 2496 (0x9c0)
root@vas:~ # 


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJcwJFMAAoJEA2k8lmbXsY0TqMH/i87vLlhbKjnQjTVOFe4x4WI
dk460CR4919CzDJ80TU8UjBwM8W6LEx+Bzb7x6JPH8LiuSGlCA9JcS1t1GGYmzAd
59VPnYWAIHOGMYKIwJN/w6CPFUC1DJY8UI53Okm5GwyK7A5pDpj2bkp1ZhyrQV5p
d2+xSZJBcyDEC45nXEOc7tDyRlSHLkM5wD0OKtOSk8V68KwlgiEQWTtHrS96s3lE
iW9mIYhqHOi8YKynRIybRffuN9XdF4LN0gNNf2HAx2HcCvHkZJBgAs4DgBLF0XhJ
CxPVhtMT47eIv+KupFfBEAIxZ0cV6dmWjwLhwZdnBqhUQZ9445d+WEijxx8lgD0=
=Lhn5
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190424163940.GA36280>