User:Hfern/Drafts/btrbk

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

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.

Installation

Btrbk is in portage.

USE flags

USE flags for app-backup/btrbk Tool for creating snapshots and remote backups of btrfs subvolumes

doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
lsbtr Enable the lsbtr command-line tool
mbuffer Use sys-block/mbuffer to enable progress bar and buffering/limiting functionality

Emerge

root #emerge --ask app-backup/btrbk

Additional software

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.

Terminology

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.

Configuration

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.

global settings

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

Service

Usage

Invocation

user $cmd --help
(Paste command help output here.)

Troubleshooting

Removal

Unmerge

root #emerge --ask --depclean --verbose category/package