All of lore.kernel.org
 help / color / mirror / Atom feed
* is send/receive
@ 2017-04-01 15:25 Lukas Tribus
  2017-04-01 16:29 ` Hugo Mills
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Tribus @ 2017-04-01 15:25 UTC (permalink / raw)
  To: Linux fs Btrfs

Hello experts,


quick question about btrfs send/receive:

Is btrfs send/receive is prone to cause destination filesystem 
corruption/failure, when the source file system is bogus (due to bugs, 
or due to other factors like memory bit-flips happening, both *within* 
the source file system)?

Or asked differently: does send/receive transfer metadata/tree (which 
may be corrupt) from source to destination?


I would like to know if send/receive is a *completely* appropriate to 
backup data to a destination btrfs filesystem, or if there is a - even a 
one in a million - chance it may corrupt the destination FS. Would it be 
preferable to use a non-btrfs destination FS for backup purposes? What 
do you guys think?


Also, if I understand correctly, checksum are not transferred through 
send/receive, therefor a corruption while transferring is possible (just 
like with rsync), right?



Thanks,

Lukas




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: is send/receive
  2017-04-01 15:25 is send/receive Lukas Tribus
@ 2017-04-01 16:29 ` Hugo Mills
  0 siblings, 0 replies; 2+ messages in thread
From: Hugo Mills @ 2017-04-01 16:29 UTC (permalink / raw)
  To: Lukas Tribus; +Cc: Linux fs Btrfs

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

On Sat, Apr 01, 2017 at 05:25:06PM +0200, Lukas Tribus wrote:
> Hello experts,
> 
> 
> quick question about btrfs send/receive:
> 
> Is btrfs send/receive is prone to cause destination filesystem
> corruption/failure, when the source file system is bogus (due to
> bugs, or due to other factors like memory bit-flips happening, both
> *within* the source file system)?
> 
> Or asked differently: does send/receive transfer metadata/tree
> (which may be corrupt) from source to destination?

   Not at that level, no.

   A send stream consists of a sequence of FS operations (copy, mkdir,
reflink, mv, snapshot, etc) which can be used to create a subvolume
which is logically equivalent to the source subvolume. Thus, if there
are broken invariants in the metadata of the source FS, they cannot be
recreated in the destination FS, because you can't create broken
metadata using those operations.

> I would like to know if send/receive is a *completely* appropriate
> to backup data to a destination btrfs filesystem, or if there is a -
> even a one in a million - chance it may corrupt the destination FS.
> Would it be preferable to use a non-btrfs destination FS for backup
> purposes? What do you guys think?

   If you have corruption which results in otherwise valid POSIX
metadata (say, somehow a UID got changed, or some permissions bits got
set into a silly but valid configuration), then that could be
transferred. Corruption leading to a "broken" filesystem (say, an
undeletable directory), no.

> Also, if I understand correctly, checksum are not transferred
> through send/receive, therefor a corruption while transferring is
> possible (just like with rsync), right?

   Correct.

   Hugo.

-- 
Hugo Mills             | Dullest spy film ever: The Eastbourne Ultimatum
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                       The Thick of It

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-01 16:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01 15:25 is send/receive Lukas Tribus
2017-04-01 16:29 ` Hugo Mills

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.