# BorgBackup

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

Stars: 13.9k · Language: Python · Categories: System

- Repository: https://github.com/borgbackup/borg
- Website: https://www.borgbackup.org/
- Page: https://www.trmn.sh/tools/borg

## Overview

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

- [bpytop](https://www.trmn.sh/tools/bpytop.md): Terminal-based system resource monitor showing CPU, memory, disk, network and process usage with interactive interface (Python, 10.9k stars)
- [auto-cpufreq](https://www.trmn.sh/tools/auto-cpufreq.md): Linux CPU speed and power optimizer that adjusts governor and turbo boost based on battery state, CPU load and temperature. Includes CLI, daemon and GUI. (Python, 7.9k stars)
- [nvitop](https://www.trmn.sh/tools/nvitop.md): Interactive NVIDIA GPU and process monitor in Python with tree view, filtering, signal sending, a CUDA device selector (nvisel), and APIs for custom tools. (Python, 7.2k stars)
- [tuptime](https://www.trmn.sh/tools/tuptime.md): System uptime tracking tool that preserves historical uptime/downtime statistics across reboots with detailed reporting (Python, 317 stars)
- [glances](https://www.trmn.sh/tools/glances.md): Cross-platform system monitoring tool with real-time stats display via terminal, web interface, or API (Python, 33.9k stars)

---

Canonical: https://www.trmn.sh/tools/borg
