Re: btrfs userspace question - where's the utility to dump/restore?
From: Valdis . Kletnieks
Date: Sat Jan 19 2013 - 13:03:07 EST
On Thu, 17 Jan 2013 22:18:19 +0000, Hugo Mills said:
> On Thu, Jan 17, 2013 at 03:05:35PM -0500, Valdis Kletnieks wrote:
> > So I'm looking at playing with btrfs, and I start looking at the
> > userspace pieces I'll need. What I can't find is an equivalent
> > of the ext[34] "dump/restore" package to dump data to an external
> > backup device. Is 'tar cf --acls --selinux --xattrs /external/fs.dump'
> > as good as it gets, or is something else recommended?
>
> tar doesn't handle reflinks(+), so the above won't quite give you a
> complete duplicate. In the btrfs tool, there's send/receive, which
> should(*) be sufficient to deal with reflinks.
So I decided to try it out on the filesystem that I stash all my music
(mostly because I can survive without that filesystem if I trash it, and
I have a known good backup).
Apparently, send/receive isn't in the manpage, which is why I didn't
see it. Fortunately, there's --help
[~] btrfs send --help
usage: btrfs send <command> <args>
btrfs send [-v] [-i <subvol>] [-p <parent>] <subvol>
Send the subvolume to stdout.
[~] btrfs send -v /mp3 > /disk2/backups/mp3.btrfs
ERROR: /mp3 is not read-only.
[~] mount -o remount,ro /mp3
[~] btrfs send -v /mp3 >| /disk2/backups/mp3.btrfs
ERROR: /mp3 is not read-only.
Bah. Obviously this isn't anywhere near as easy as it is for ext4.
/me wanders off to find more caffeine...
Attachment:
pgp00000.pgp
Description: PGP signature