Re: Is anyone using btrfs send/receive for backups instead of rsync?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2013-12-30 at 08:17 -0800, Marc MERLIN wrote:
+AD4- On Mon, Dec 30, 2013 at 04:05:03PM +-0000, Chris Mason wrote:
+AD4- +AD4- On Sat, 2013-12-28 at 10:20 -0800, Marc MERLIN wrote:
+AD4- +AD4- +AD4- On Sat, Dec 28, 2013 at 10:07:58AM -0800, Marc MERLIN wrote:
+AD4- +AD4- +AD4- +AD4- For instance, if I use an existing rsync destination to start syncing
+AD4- +AD4- +AD4- +AD4- btrfs snapshots to after that, and one file operation can't be applied
+AD4- +AD4- +AD4- +AD4- because let's say the destination file it's supposed to be applied to,
+AD4- +AD4- +AD4- +AD4- isn't there?
+AD4- +AD4- +AD4- 
+AD4- +AD4- +AD4- I should have written more: I'm guessing what happens is that the btrfs
+AD4- +AD4- +AD4- receive fails/aborts, I get an error, I then run a manual rsync to reset
+AD4- +AD4- +AD4- everything to a good known state, and then continue the btrfs
+AD4- +AD4- +AD4- send/receive after that?
+AD4- +AD4- 
+AD4- +AD4- Btrfs send/receive works by matching state between snapshots on the
+AD4- +AD4- sending and receiving end.  If you update the files manually on the
+AD4- +AD4- receiving end (say with rsync), it can't merge the states anymore.
+AD4- 
+AD4- I got that, but it wasn't quite my question :)
+AD4- 
+AD4- I understand that btrfs receive cannot apply file changes if the
+AD4- destination filesystem isn't in a file state that's identical to the source
+AD4- one.
+AD4- 
+AD4- I'm just not too sure how the destination FS needs to be configured so
+AD4- that btrfs receive can work with it.
+AD4- 
+AD4- 1) Does it need to be an exact byte for byte copy of the block device the
+AD4- source was on?
+AD4- 
No, in fact this doesn't help.

+AD4- 2) Or can the destination be seeded with a full rsync or cp -a and can btrfs receive
+AD4- take over from there?
+AD4- 

No, it has to be created by btrfs receive.

+AD4- 3) Then, if I hit a bug where something doesn't get synced right, and I run
+AD4- rsync to fix or verify that the two FS are indeed identical file-wise
+AD4- like they're supposed to, if rsync fixes something, are you saying that
+AD4- it'll stop btrfs receive from working after that?
+AD4- 

Yes, today anyway it won't work.  Send converts the changed items into
an intermediate format (we don't send btree blocks directly over the
wire) and then receive modifies the destination from userland.

At the end of the stream we update the destination root to say +ACI-you're
now version xxyyzz of uuid aabbcc+ACI-.

We definitely could add a way to manually set this, but once a user does
it, it'll be very hard to debug any problems they might have had if
their copy wasn't actually up to date.

-chris

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux