Commit Graph

11 Commits

Author SHA1 Message Date
Josef Bacik 7854c8b667 Btrfs-progs: give restore a list roots option
Since restore has the ability to open really really screwed up file systems, add
a list roots option to it so we can still get the contents of the tree root on a
horribly broken fs.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
2013-03-18 18:14:19 +01:00
Josef Bacik b268a41725 btrfs-progs: add lzo compression support to restore
This patch simply adds support to decompress lzo compressed extents in restore.

Signed-off-by: Josef Bacik <josef@redhat.com>
2013-03-18 18:14:19 +01:00
Peter Stuge 4ddd5874d9 restore: Split output directory and btrfs-local path search_dir() parameters
search_dir() recurses down the btrfs tree, and used to take the output
path for every item (i.e. in the running system, output root directory
concatenated with btrfs-local pathname) passed as the only path
parameter. Moving the output root directory to a separate parameter
and passing the btrfs-local pathname for each file and directory
separately allows easy filtering based on the btrfs-local pathname.

Signed-off-by: Peter Stuge <peter@stuge.se>
Signed-off-by: Josef Bacik <josef@redhat.com>
2013-03-18 18:14:19 +01:00
David Marcin c2839e123a btrfs-progs: Fix error handling for failed reads in restore tool when mirrors exist
Signed-off-by: David Marcin <djmarcin@google.com>
2013-03-18 18:14:18 +01:00
Josef Bacik 23bfbf0328 Btrfs-progs: try other mirrors on read failure
If we hit a bad disk and the read doesn't work, try other mirrors in case we
have other disks with good copies.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
2013-03-18 18:14:18 +01:00
Josef Bacik 9969ea479d Btrfs-progs: try other mirrors if decompression fails
This will make the restore program fall back on other mirrors if it fails to
decompress an extent for whatever reason.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
2013-03-18 18:14:10 +01:00
Josef Bacik 331295de05 Btrfs-progs: add an option for specifying the root to restore
If the normal fs tree is hosed and the user has multiple subvolumes it's handy
to be able to specify just one of the subvolumes to restore.  It's also handy if
a user only wants to restore say /home instead of his entire disk.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
2013-03-15 18:54:49 +01:00
Anand Jain 8fb9c91135 btrfs-progs: usage should match what is coded
Signed-off-by: Anand Jain <anand.jain@oracle.com>
2013-03-03 17:34:36 +01:00
Eric Sandeen 3d118fe6c4 btrfs-progs: provide positive errno to strerror in cmd_restore
check_mounted returns a negative errno, so it needs to be flipped
again before passing to strerror.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2013-02-27 14:39:48 +01:00
Ian Kumlien e43cc46155 Btrfs-progs: add restore command to btrfs
Add 'btrfs restore' command which previously existed as a separate
utility btrfs-restore.

Signed-off-by: Ian Kumlien <pomac@demius.net>
Signed-off-by: David Sterba <dsterba@suse.cz>
2013-02-12 23:46:15 +01:00
Ian Kumlien 1b1e07190f Btrfs-progs: restore.c -> cmds-restore.c
The btrfs-restore functionality will be integrated in
btrs as "btrfs restore"

Signed-off-by: Ian Kumlien <pomac@demius.net>
2013-02-12 23:46:15 +01:00