From: Wolfgang Mader <Wolfgang_Mader@brain-frog.de>
To: linux-btrfs@vger.kernel.org
Subject: Re: Understanding btrfs and backups
Date: Fri, 07 Mar 2014 11:13:51 +0100 [thread overview]
Message-ID: <2875521.9HaU3OuHLy@discus> (raw)
In-Reply-To: <pan$ee422$4703cdfd$58fec22b$1a891275@cox.net>
Duncan, thank you for this comprehensive post. Really helpful as always!
[...]
> As for restoring, since a snapshot is a copy of the filesystem as it
> existed at that point, and the method btrfs exposes for accessing them is
> to mount that specific snapshot, to restore an individual file from a
> snapshot, you simply mount the snapshot you want somewhere and copy the
> file as it existed in that snapshot over top of your current version
> (which will have presumably already been mounted elsewhere, before you
> mounted the snapshot to retrieve the file from), then unmount the
> snapshot and go about your day. =:^)
Please, how do I list mounted snapshots only?
[...]
>
> Since a snapshot is an image of the filesystem as it was at that
> particular point in time, and btrfs by nature copies blocks elsewhere
> when they are modified, all (well, not "all" as there's metadata like
> file owner, permissions and group, too, but that's handled the same way)
> the snapshot does is map what blocks composed each file at the time the
> snapshot was taken.
Is it correct, that e.g. ownership is recorded separately from the data
itself, so if I would change the owner of all my files, the respective
snapshot would only store the old owner information?
[...]
>
> The first time you do this, there's no existing copy at the other end, so
> btrfs send sends a full copy and btrfs receive writes it out. After
> that, the receive side has a snapshot identical to the one created on the
> send side and further btrfs send/receives to the same set simply
> duplicate the differences between the reference and the new snapshot from
> the send end to the receive end. As with local snapshots, old ones can
> be deleted on both the send and receive ends, as long as at least one
> common reference snapshot is maintained on both ends, so diffs taken
> against the send side reference can be applied to an appropriately
> identical receive side reference, thereby updating the receive side to
> match the new read-only snapshot on the send side.
Is the receiving side a complete file system in its own right? If so, I only
need to maintain one common reference in order to apply the received snapshot,
right. If I would in any way get the send and receive side out of sync, such
that they do not share a common reference any more, only the send/receive
would fail, but I still would have the complete filesystem on the receiving
side, and could copy it all over (cp, rscync) to the send side in case of a
disaster on the send side. Is this correct?
Thank you!
Best,
Wolfgang
--
Wolfgang Mader
Wolfgang.Mader@fdm.uni-freiburg.de
Telefon: +49 (761) 203-7710
Institute of Physics
Hermann-Herder Str. 3, 79104 Freiburg, Germany
Office: 207
next prev parent reply other threads:[~2014-03-07 10:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 18:18 Understanding btrfs and backups Eric Mesa
2014-03-06 21:33 ` Duncan
2014-03-07 10:13 ` Wolfgang Mader [this message]
2014-03-09 15:46 ` Duncan
2014-03-07 14:03 ` Eric Mesa
2014-03-07 15:14 ` Sander
2014-03-09 4:13 ` Chris Samuel
2014-03-09 15:30 ` Duncan
2014-03-13 8:18 ` Chris Samuel
2014-03-09 16:40 ` Duncan
2014-03-11 0:39 ` Testing BTRFS Lists
2014-03-11 1:02 ` Avi Miller
2014-03-11 19:08 ` Eric Sandeen
2014-03-11 20:30 ` Avi Miller
2014-03-12 11:15 ` xfstests btrfs/035 (was Re: Testing BTRFS) David Disseldorp
2014-03-13 18:10 ` Testing BTRFS Lists
2014-03-13 20:20 ` Avi Miller
2014-03-11 13:33 ` Josef Bacik
2014-03-13 17:12 ` Understanding btrfs and backups Chris Murphy
2014-03-17 5:42 ` Understanding btrfs and backups => automatic snapshot script Marc MERLIN
2014-03-21 5:57 ` Marc MERLIN
2014-03-21 7:41 ` Duncan
-- strict thread matches above, loose matches on Subject: below --
2014-03-06 19:27 Understanding btrfs and backups Eric Mesa
2014-03-06 21:17 ` Brendan Hide
2014-03-06 20:37 Eric Mesa
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=2875521.9HaU3OuHLy@discus \
--to=wolfgang_mader@brain-frog.de \
--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