High-performance, standalone backup restore tool for backy. backy-extract restores a specified backup revision to stdout or a file/block device target.
- Pick a backup revision, for example using
backy status
. - Create a restore target, for example with
lvm
orrbd image
. - Extract backup:
backy-extract /srv/backy/vm/Nym6uacWoXGb8VnbksM3yH /dev/rbd0
backy-extract
tries to acquire the purge lock before proceeding. So if it
does not seem to start, check if there are running backy
processes operating
on the same backup.
Block devices are assumed to be zeroed (discarded) before restoring. If this is
not the case, invoke backy-extract
with --sparse=never
.
In general, cargo build --release
should do the right thing. This application
depends on liblzo2 being availabe.
If you get compiler/linker errors, try compiling again with export LIBRARY_PATH=/path/to/liblzo2
.
A Makefile is supplied to create a statically linked release which should run on virtually every Linux x86_64 system.
backy-fuse
provides access to individual revisions via FUSE (filesystem in
userspace). This allows to mount backup images and retrieve single files.
- Start
backy-fuse
to mount a backup via FUSE:backy-fuse -d /srv/backy/vm /mnt/backy-fuse
- Pick a revision and create loop device:
losetup -f -P --show /mnt/backy-fuse/tAGKE5rrxReggVMtoPSr7
- Create loop mount:
mount -oro /dev/loop0p1 /mnt/restore
When finished, the above stops must be reversed:
- Unmount loop device:
umount /mnt/restore
- Unregister loop device:
losetup -d /dev/loop0
- Finish FUSE:
fusermount -u /mnt/backy-fuse
backy-fuse
is not compiled by default due to restricted portability. To
compile it, run cargo build --release --features fuse_driver
. Note that both
liblzo2 and libfuse must be detectable by the linker.
Please create issues and submit pull requests at https://github.com/flyingcircusio/backy-extract/.
Contact Christian Kauhaus for questions, suggestions, and bug fixes.