btrsync Documentation

btrsync is a tool for replicating btrfs subvolumes, handling Copy-on-Write (COW) relationships and incremental transfers automatically.

Why btrsync?

btrfs is a modern Linux Copy-on-Write (COW) filesystem supporting powerful features such as snapshotting and incremental serialization. This makes it easy to efficiently replicate related snapshots from one filesystem to another by transferring only the differences between them.

What is not easy, however, is manually identifying and tracking these relationships in order to fully leverage the features of btrfs. Built-in tools provide the necessary mechanisms, but the heavy lifting is left to the user.

This is where btrsync comes in.

True to its name, btrsync is “rsync, but for btrfs”, reducing the complex task of comparing and replicating snapshots down to a one-liner:

btrsync SOURCE DESTINATION

Features

  • Handles subvolume discovery and incremental transfers automatically

  • Supports local and remote machines (through SSH)

  • Intuitive CLI inspired by familiar tools like rsync and scp

Installation

btrsync requires Python 3.9 or later.

The easiest way to install is from PyPI via pip:

pip install btrsync

(replace pip with pip3 if your system’s pip defaults to Python 2)

Alternatively, you can check out the latest source at GitHub.

Usage

For running btrsync as a command-line utility see CLI Usage.

For importing btrsync directly into your Python programs see API Reference.

Contributing

For bug reports and feature proposals use the GitHub Issues page.

You can also support this project by buying me a coffee.

Contents

Indices and tables