linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Calvin Walton <calvin.walton@kepstin.ca>
To: "Fajar A. Nugraha" <list@fajar.net>
Cc: "Brian J. Murrell" <brian@interlinx.bc.ca>, linux-btrfs@vger.kernel.org
Subject: Re: efficiency of btrfs cow
Date: Sun, 06 Mar 2011 11:17:26 -0500	[thread overview]
Message-ID: <1299428248.15017.13.camel@ayu> (raw)
In-Reply-To: <AANLkTi=-bxNwFmp8GZ_Foz=CSP2kUOwqPKAaMFapGuz+@mail.gmail.com>

On Sun, 2011-03-06 at 23:02 +0700, Fajar A. Nugraha wrote:
> On Sun, Mar 6, 2011 at 10:46 PM, Brian J. Murrell <brian@interlinx.bc.ca> wrote:
> > # cp -al /backup/previous-backup/ /backup/current-backup
> > # rsync -aAHX ... --exclude /backup / /backup/current-backup
> >
> > The shortcoming of this of course is that it just takes 1 byte in a
> > (possibly huge) file to require that the whole file be recopied to the
> > backup.
> 
> If you have snapshots anyway, why not :
> - create a snapshot before each backup run
> - use the same directory (e.g. just /backup), no need to "cp" anything
> - add "--inplace" to rsync

To add a bit to this: if you *do not* use the --inplace option on rsync,
rsync will rewrite the entire file, instead of updating the existing
file!
This of course negates some of the benefits of btrfs's COW support when
doing incremental backups.

-- 
Calvin Walton <calvin.walton@kepstin.ca>


  parent reply	other threads:[~2011-03-06 16:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-06 15:46 efficiency of btrfs cow Brian J. Murrell
2011-03-06 16:02 ` Fajar A. Nugraha
2011-03-06 16:11   ` Brian J. Murrell
2011-03-06 16:17   ` Calvin Walton [this message]
2011-03-06 16:18     ` Brian J. Murrell
2011-03-06 17:22   ` Freddie Cash
2011-03-06 16:06 ` Calvin Walton
2011-03-06 16:17   ` Brian J. Murrell
2011-03-23 12:39   ` Brian J. Murrell
2011-03-23 15:53     ` Chester
2011-03-23 16:19       ` Brian J. Murrell
2011-03-23 17:36     ` Kolja Dummann

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=1299428248.15017.13.camel@ayu \
    --to=calvin.walton@kepstin.ca \
    --cc=brian@interlinx.bc.ca \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=list@fajar.net \
    /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).