BorgBackup (Borg) is a deduplicating backup program with optional compression and authenticated encryption. The main goal of Borg is to provide an efficient and secure way to backup data. Using content-defined chunking and deduplication, Borg minimizes storage requirements while maintaining fast backup speeds. It is trusted by system administrators worldwide for critical data protection.
📑 Table of Contents
Key Features
- Deduplication – Space-efficient storage through content-defined chunking
- Compression – LZ4, zstd, zlib, and lzma compression algorithms
- Encryption – AES-256-CTR with HMAC-SHA256 authentication
- Remote Repositories – Backup over SSH to remote servers
- Mountable Backups – Mount archives as FUSE filesystem
- Pruning – Automatic retention policy management
Installation
# Debian/Ubuntu
sudo apt install borgbackup
# RHEL/CentOS/Fedora
sudo dnf install borgbackup
# Arch Linux
sudo pacman -S borg
# Using pip
pip install borgbackup
Basic Usage
# Initialize repository
borg init --encryption=repokey /backup/repo
# Create backup
borg create /backup/repo::backup-{now} ~/Documents
# List archives
borg list /backup/repo
# Extract archive
borg extract /backup/repo::backup-name
# Mount backup as filesystem
borg mount /backup/repo::backup-name /mnt/backup
# Prune old backups
borg prune --keep-daily=7 --keep-weekly=4 --keep-monthly=6 /backup/repo
Use Cases
Borg is perfect for server backups, home directory protection, database backups, offsite replication, and any scenario requiring efficient deduplication.
Was this article helpful?