Btrbk is a backup tool for btrfs subvolumes, taking advantage of btrfs specific capabilities to create atomic snapshots and transfer them incrementally to your backup locations. Having btrfs partitions is therefore a prerequisite to using using btrbk.
Btrbk is in portage.
USE flags for app-backup/btrbk Tool for creating snapshots and remote backups of btrfs subvolumes
||Use sys-apps/pv to enable progress bar functionality|
emerge --ask app-backup/btrbk
When btrbk is used to transfer backups to a central backup server some additional software may be required:
- ssh is used to transfer backups to a remote server. Package net-misc/openssh is a dependency
- mbuffer can be used to speedup the communications. It would need to be installed on the backup server. It's package sys-block/mbuffer is not a dependency, see also bug #673250.
Throughout this article certain btrfs and btrbk terms and concepts are used and it's best to define them first:
- volume: a btrfs root subvolume, with subvolid=5
- subvolume: a read/write btrfs subvolume under a volume
- snapshot: a readonly btrfs subvolume with a parent-uuid
- backup: a btrbk read-only subvolume created with send/receive, with a received-uuid.
Btrbk installs a well documented sample configuration file at etc/btrbk/btrbk.conf.example. Copy it to /etc/btrbk/btrbk.conf, and adapt it to your requirements. The configuration file has some general settings, and settings per volume that needs to be backed up.
These settings can be defined on a global level, but can be overriden per volume.
- transaction_log: location of the log
- stream_buffer: the size of the in memory buffer used by mbuffer, if a remote backup server is used
- snapshot_dir: relative to the volume. Note that btrbk does not create this directory.
per volume settings
(Paste command help output here.)
emerge --ask --depclean --verbose category/package
- (Link to external resources (outside the Wiki) using bullet points in this section. It is common for the information in this section to full sentences that are links.)