How to Get Started with BorgBackup

Updated

BorgBackup (Borg) is a deduplicating archiver with compression and authenticated encryption, and getting started takes one command: point Borg at a repository — a local disk, USB drive, or any machine reachable over SSH — and run a backup. There are no daemons, no agents, and no lock-in. This guide covers what you need before you start, the install options, and the first backup workflow.

What you need before starting

  • A machine running Linux, macOS, BSD, or another supported platform.
  • A place to store the repository: a local disk, a USB drive, or a remote host you can reach over SSH.
  • Borg installed on the machine that runs the backup. If you back up to a remote host over SSH, Borg must also be installed there.

Install Borg

Borg's own documentation lists three installation routes:

Method Best for
Distribution packages Most users on Linux/BSD who want the system package manager to handle updates
Single-file binaries Systems without a suitable package, or when you want a self-contained executable
pip Environments where you manage Python packages yourself

Pick the one that matches how you already manage software on that machine.

Create a repository

A repository is where Borg stores deduplicated, compressed, encrypted chunks. Create one before your first backup, pointing at your chosen destination — a local path, a mounted USB drive, or an SSH location.

The key behavior to understand: Borg stores your files as content-defined chunks, and identical chunks are stored exactly once — across files, across machines, and across years of history. This is why daily full backups cost little more than the changes since yesterday. Your first backup writes everything; later backups mostly reference chunks that already exist.

Run your first backup

A backup is one command. Point Borg at the repository you created and at the data you want to protect. Because Borg does not run as a daemon or install an agent, there is nothing to keep running between backups — you invoke it when you want a backup.

What happens on that first run:

  1. Borg reads your files and splits them into content-defined chunks.
  2. New chunks are compressed using your chosen algorithm and encrypted.
  3. Chunks are written to the repository; chunks already present are referenced, not stored again.

Choose compression

Borg lets you pick the trade-off per your needs:

  • lz4 — speed
  • zstd — balance between speed and size
  • zlib and lzma — maximum compression
  • none — no compression at all

There is no single correct choice; it depends on whether you value backup speed or repository size more.

Understand the encryption model

Borg uses AES encryption with cryptographic authentication. A practical consequence: your backup server never needs to be trusted, because it only ever sees ciphertext. That matters if you back up to a remote machine or shared storage you do not fully control.

Browse old versions without restoring

You can mount any archive as a regular filesystem with FUSE and browse old versions of your files like any folder. This is useful when you want to check or copy a single file from an earlier backup rather than performing a full restore.

Watch real sessions before you commit

Borg's site hosts recorded terminal sessions rather than marketing videos — every frame is real text, so you can pause the player and select and copy anything you see. If you want to see the commands in action before running them against your own data, these demos are the place to look.

Common sticking points

  • Forgetting the repository must exist first. Create it before your first backup command.
  • Assuming a remote host needs no Borg. If you back up over SSH, Borg has to be installed on the remote side too.
  • Expecting the first backup to be as fast as later ones. The first run stores everything; subsequent runs benefit from deduplication and store mainly what changed.
  • Treating the backup server as trusted. With Borg's authenticated encryption, it does not need to be — it only sees ciphertext.

Borg is free software under the BSD license, developed in the open since 2015, so you can inspect it, use it commercially, and rely on an active community for support.