linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Planning for subvolumes of subvolumes and btrfs send/receive
@ 2014-04-20 19:46 Marc MERLIN
  2014-04-21  5:21 ` Duncan
  2014-04-21  5:39 ` Chris Murphy
  0 siblings, 2 replies; 6+ messages in thread
From: Marc MERLIN @ 2014-04-20 19:46 UTC (permalink / raw)
  To: linux-btrfs

Can you help me design this right?

Long story short, I'm wondering if I can use btrfs send to copy sub
subvolumes (by snapshotting a parent subvolume, and hopefully getting
all the children underneath). My reading so far, says no.

So, Ideally I would have:

/mnt/btrfs_pool/backup: backup is a subvolume of btrfs_pool

/mnt/btrfs_pool/backup/debian/machine1: 
/mnt/btrfs_pool/backup/debian/machine2: 
/mnt/btrfs_pool/backup/debian/machine3: 
machinex would be a subvolume ideally speaking for quota counting purposes

/mnt/btrfs_pool/backup/debian/machine1/current
/mnt/btrfs_pool/backup/debian/machine1/201401
/mnt/btrfs_pool/backup/debian/machine1/201308
...

current would be a subvolume, that would be snapshotted to 201401 with
an rsync of diffs on top
Same thing for 201308

In other words, they'd also be subvolumes, and I'm using snapshots so
that I can collapse the identical data (I'm currently using hardlinks
for that).

This would all work fine from what I can see, but from here, if I try to
do 
btrfs subvolume snapshot -r /mnt/btrfs_pool/backup/debian/machine1 /mnt/btrfs_pool/backup/debian/machine1_ro_send
do to a btrfs send next, my understanding is that /mnt/btrfs_pool/backup/debian/machine1_ro_send
will effectively have no data because all my data is in the subvolumes
under that.

As a result, I'd then need a complicated script that goes in each
subvolume and makes independent snapshots for btrfs send/receive.

(In this case, I'm copying my backup data to another backup backup
server)

Is there an easier way to do this, or you can really only btrfs send the
very last level of subvolume if I want the data in there?

I suppose I could use cp -a --reflink instead of snapshots to replicate
the identical data, but the reason I don't love this is that there is no
way I know to replicate that reflink relationship to another filesystem
unless I use btrfs send/receive. Is that correct?

Thanks,
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/                         | PGP 1024R/763BE901

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

end of thread, other threads:[~2014-04-21 21:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-20 19:46 Planning for subvolumes of subvolumes and btrfs send/receive Marc MERLIN
2014-04-21  5:21 ` Duncan
2014-04-21  5:39 ` Chris Murphy
2014-04-21  5:48   ` Marc MERLIN
2014-04-21  6:08     ` Chris Murphy
2014-04-21 21:51       ` Marc MERLIN

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).