Re: btrfs userspace question - where's the utility to dump/restore?

2013-01-19 Thread Valdis . Kletnieks
On Thu, 17 Jan 2013 22:18:19 +, 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  

btrfs send [-v] [-i ] [-p ] 
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...


pgp3mpfmuo5PP.pgp
Description: PGP signature


Re: btrfs userspace question - where's the utility to dump/restore?

2013-01-19 Thread Valdis . Kletnieks
On Thu, 17 Jan 2013 22:18:19 +, 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...


pgp3mpfmuo5PP.pgp
Description: PGP signature


Re: btrfs userspace question - where's the utility to dump/restore?

2013-01-17 Thread Hugo Mills
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.

   Hugo.

(+) aka CoW copies, or snapshots
(*) I regret to say that I've not had the opportunity to play with
send/receive myself yet, so I can't advise on the details of making it
work yet.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
   --- Prisoner unknown:  Return to Zenda. ---   


signature.asc
Description: Digital signature


btrfs userspace question - where's the utility to dump/restore?

2013-01-17 Thread Valdis Kletnieks
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?


pgpE2slZ4UrO1.pgp
Description: PGP signature


btrfs userspace question - where's the utility to dump/restore?

2013-01-17 Thread Valdis Kletnieks
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?


pgpE2slZ4UrO1.pgp
Description: PGP signature


Re: btrfs userspace question - where's the utility to dump/restore?

2013-01-17 Thread Hugo Mills
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.

   Hugo.

(+) aka CoW copies, or snapshots
(*) I regret to say that I've not had the opportunity to play with
send/receive myself yet, so I can't advise on the details of making it
work yet.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
   --- Prisoner unknown:  Return to Zenda. ---   


signature.asc
Description: Digital signature