borg
Deduplicating backup with compression and encryption
TLDR
Initialize repository
SYNOPSIS
borg command [options]
DESCRIPTION
borg (BorgBackup) is a deduplicating backup program with compression and authenticated encryption. It efficiently stores multiple backups by sharing common data blocks, making it ideal for frequent backups of large datasets.
The tool provides security, efficiency, and reliability for local and remote backups.
PARAMETERS
init
Initialize repositorycreate
Create new archiveextract
Extract archive contentslist
List archives or contentsdiff
Compare archivesdelete
Delete archiveprune
Delete old archives by retention policyinfo
Show archive/repository informationmount
Mount archive as filesystemcheck
Verify repository consistency
ENCRYPTION MODES
repokey
Key stored in repositorykeyfile
Key stored locallynone
No encryptionauthenticated
Authenticated only (no encryption)
WORKFLOW
borg init --encryption=repokey /backup/repo
# Create first backup
borg create /backup/repo::monday /home/user
# Create incremental backup (automatic deduplication)
borg create /backup/repo::tuesday /home/user
# List backups
borg list /backup/repo
# Restore
borg extract /backup/repo::monday
# Mount for browsing
borg mount /backup/repo::monday /mnt/backup
# Prune old backups
borg prune --keep-daily=7 --keep-weekly=4 /backup/repo
FEATURES
- Deduplication (chunk-level)
- Compression (lz4, zstd, zlib)
- Encryption (AES)
- Remote backups over SSH
- Sparse file support
- Archive mounting
- Data verification
- Efficient storage
CAVEATS
Repository corruption can lose all backups (keep offsite copies). Encryption key loss means permanent data loss. Large repos need significant RAM for cache. SSH connection required for remote repos. Check operations can be slow.
HISTORY
BorgBackup was created by Thomas Waldmann in 2015 as a fork of Attic backup, focusing on performance, security, and reliability.
