gitwtfhub

wtf is borg?

borgbackup/borg — explained in plain English

Analysis updated 2026-06-24

13,317PythonAudience · ops devopsComplexity · 3/5Setup · moderate

TL;DR

A backup tool that saves space by only storing new chunks when files haven't changed, with encryption and easy remote backups over SSH.

Mindmap

mindmap
  root((repo))
    What it does
      Deduplication backup
      Encrypt before upload
      Compress data
      Mount as folder
    Supported Systems
      Linux
      macOS
      FreeBSD
      Windows via WSL
    Use Cases
      Daily server backup
      Remote SSH backup
      Restore single files
    Tech Stack
      Python
      SSH transport
      Multiple compressors

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Set up encrypted daily backups of a server to a remote SSH host with minimal storage growth over time.

REASON 2

Back up your laptop and restore a single file without extracting the whole archive.

REASON 3

Run space-efficient incremental backups of large datasets that barely grow with each daily run.

REASON 4

Mount a past backup as a regular folder to browse and retrieve specific file versions.

What's in the stack?

PythonSSHlz4zstdzliblzmaFUSE

How it stacks up

borgbackup/borgsshuttle/sshuttlecoleam00/context-engineering-intro
Stars13,31713,32113,310
LanguagePythonPythonPython
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audienceops devopsops devopsvibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Must install Borg on both local and remote server for best performance, requires SSH access to a backup destination.

Wtf does this do

BorgBackup (short: Borg) is a backup program focused on efficient storage through deduplication. When you run a backup, Borg splits your files into chunks and checks each chunk against what is already stored in the repository. If a chunk already exists, it is skipped entirely. This means a second backup of largely unchanged files takes very little additional space, and daily incremental backups accumulate slowly even for large data sets. Backups can be compressed using several algorithms ranging from fast-and-light to slow-and-compact: lz4, zstd, zlib, and lzma. All data can also be encrypted on your machine before it leaves, using 256-bit authenticated encryption, which means your files are protected even if someone gains access to the storage server. An optional obfuscation mode can disguise chunk sizes to make it harder to fingerprint your backup contents from the outside. Borg works well for remote backups over SSH. If Borg is also installed on the remote server, some processing happens there, which improves performance compared to accessing backup storage over a standard network share. Once a backup is stored, you can mount it as a file system and browse its contents like a normal folder, which makes restoring individual files straightforward without extracting an entire archive. The tool runs on Linux, macOS, and FreeBSD, with experimental support on Windows via Windows Subsystem for Linux. The repository's README notes that the current master branch is Borg version 2, which is in beta and not recommended for production backups. The stable version is documented at the project's main website.

Yoink these prompts

Prompt 1
Write a bash script that uses BorgBackup to back up ~/Documents to a remote SSH server at [email protected]:/backups with AES-256 encryption and runs every night.
Prompt 2
I have a BorgBackup repository at /mnt/backups/myrepo. Show me how to mount it and browse its contents to find a file I deleted last week.
Prompt 3
Write a BorgBackup prune command that keeps 7 daily, 4 weekly, and 6 monthly archives and deletes older ones automatically.
Prompt 4
I want to start using BorgBackup on macOS. Walk me through initializing an encrypted repository and creating my first backup of /Users/me.

Frequently asked questions

wtf is borg?

A backup tool that saves space by only storing new chunks when files haven't changed, with encryption and easy remote backups over SSH.

What language is borg written in?

Mainly Python. The stack also includes Python, SSH, lz4.

How hard is borg to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is borg for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.