BorgBackup logo

BorgBackup

Deduplicating backup program with optional compression and authenticated encryption, supporting ssh, sftp, s3, b2 and rclone targets, and mountable archives.

BorgBackup (Borg) is a command-line backup program that deduplicates data, and optionally compresses and encrypts it. This README covers the unstable Borg2 / master branch, which is in beta. It may change incompatibly between beta releases, with no upgrade path from one beta to the next, so repositories must be deleted and re-created. The README says not to use it for production backups.

Deduplication uses content-defined chunking. Each file is split into variable-length chunks, and only chunks not already in the repository are stored. This works across machines, previous backups and renamed or moved files. A small change to a large file, such as a VM image, adds only a few new chunks. Chunkers include fastcdc (the default), buzhash64, buzhash, keyed AES-based chunkers (toeplitz-aes, rabin-aes, goldilocks-aes) that resist chunk-boundary fingerprinting, and fixed block size. Client-side encryption uses AES-OCB or chacha20-poly1305. There are also authenticate-only modes (authenticated-sha256, authenticated-blake3). Compression options are lz4, zstd, zlib and lzma. Optional obfuscation hides file and chunk sizes. Chunking, compression and encryption are implemented in C/Cython, with SIMD paths for NEON, AVX2 and AVX-512.

Repositories can be stored locally or on remote targets: ssh:// and http(s):// (faster when borg is installed on the server), sftp://, s3://, b2://, and any provider supported by rclone:. Archives can be mounted as user-space file systems to browse and restore files with a regular file manager. Typical use is export BORG_REPO=/path/to/repo, then borg repo-create --encryption=aes256-ocb --key-location=repokey, then borg create docs ~/Documents. borg create -v --stats prints original and deduplicated sizes. Single-file binaries are provided for Linux (x86_64, arm64), macOS (arm64, x86_64), FreeBSD (x86_64) and experimentally Windows. It also runs on NetBSD, OpenBSD, illumos/Solaris, Cygwin and WSL. It suits sysadmins and individuals who want regular backups to untrusted or off-site storage.

Alternatives & related tools

add a badge to your README

Maintain BorgBackup? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/borg.svg)](https://www.trmn.sh/tools/borg?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/borg?utm_source=badge"><img src="https://www.trmn.sh/badge/borg.svg" alt="Featured on trmn" height="20"></a>