linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc MERLIN <marc@merlins.org>
To: Chris Mason <clm@fb.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	"hugo@carfax.org.uk" <hugo@carfax.org.uk>
Subject: Re: Is anyone using btrfs send/receive for backups instead of rsync?
Date: Mon, 30 Dec 2013 09:10:39 -0800	[thread overview]
Message-ID: <20131230171039.GC26054@merlins.org> (raw)
In-Reply-To: <1388420830.11341.12.camel@ret.masoncoding.com>

On Mon, Dec 30, 2013 at 04:26:42PM +0000, Chris Mason wrote:
> > 1) Does it need to be an exact byte for byte copy of the block device the
> > source was on?
> > 
> No, in fact this doesn't help.
> 
> > 2) Or can the destination be seeded with a full rsync or cp -a and can btrfs receive
> > take over from there?
> 
> No, it has to be created by btrfs receive.

Aaah, I wasn't clear on that, thanks for clarifying.
So I need to make sure the target block device is at least as big as the
source one, and if necessary a few blocks bigger if the drives do not
allocate partitions of the exactly the same size.

Mmmh, this makes it less desirable for me to use this then since I use over
allocation on the backup servers and if I had to have as much space blocked
off for the full size of each filesystem backed up, I'm going to be short.

Bummer.
 
> > 3) Then, if I hit a bug where something doesn't get synced right, and I run
> > rsync to fix or verify that the two FS are indeed identical file-wise
> > like they're supposed to, if rsync fixes something, are you saying that
> > it'll stop btrfs receive from working after that?
> 
> 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 "you're
> now version xxyyzz of uuid aabbcc".
> 
> 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.

Understood. I dreamt that it was computing file differences and could just
apply them on top of any other btrfs filesystem, even if it were smaller and
had been created via rsync.

If one day, it could at least work on a subvolume level (only sync a
subvolume), then it would be more useful to me. Maybe later...

Thanks for clearing that up.

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  

  reply	other threads:[~2013-12-30 17:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-28 17:19 Is anyone using btrfs send/receive for backups instead of rsync? Marc MERLIN
2013-12-28 17:37 ` Hugo Mills
2013-12-28 18:01   ` Emil Karlson
2013-12-28 19:34     ` Richard Michael
2013-12-28 19:52       ` Emil Karlson
2013-12-28 20:34         ` Richard Michael
2013-12-28 23:11           ` Chris Murphy
2013-12-28 23:55             ` Emil Karlson
2013-12-29  0:08               ` Chris Murphy
2013-12-29 12:39             ` Duncan
2013-12-30  0:38               ` systemd-journal, nodatacow, was: " Chris Murphy
2013-12-30  8:07                 ` Duncan
2013-12-30 16:00                 ` Chris Mason
2013-12-28 18:07   ` Marc MERLIN
2013-12-28 18:20     ` Marc MERLIN
2013-12-30 16:05       ` Chris Mason
2013-12-30 16:17         ` Marc MERLIN
2013-12-30 16:26           ` Chris Mason
2013-12-30 17:10             ` Marc MERLIN [this message]
2013-12-30 17:48               ` Chris Murphy
2013-12-30 17:57                 ` Marc MERLIN
2013-12-30 18:39                   ` Chris Murphy
2014-01-03 20:15                   ` Marc MERLIN
2014-01-03 20:35                     ` Chris Mason
2014-01-07 10:49     ` Is anyone using btrfs send/receive howto? Marc MERLIN
2014-01-07 10:53       ` Hugo Mills
2014-01-08  8:02         ` Marc MERLIN
2014-03-21 17:29           ` Send/Receive howto and script for others to use (was Re: Is anyone using btrfs send/receive) Marc MERLIN
2014-03-22 19:44             ` Brendan Hide
2014-03-22 19:53               ` Brendan Hide
2014-03-22 20:00               ` Marc MERLIN
2014-03-22 21:02                 ` Brendan Hide
2014-03-22 21:11                   ` Marc MERLIN
2014-03-23  7:12                     ` Brendan Hide

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131230171039.GC26054@merlins.org \
    --to=marc@merlins.org \
    --cc=clm@fb.com \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).