Sub topic 2
restic or Borg: how to choose
Assume you can use the Linux command line, basic shell scripts, SSH keys, systemd, and file permissions. You should also know what your server stores under /etc, /home, and /var.
Both restic and BorgBackup create encrypted, deduplicated backups. Deduplication stores a repeated block of data once, so later backups use less space. Each backup appears as a restic snapshot or a Borg archive.
The main difference
Restic is usually the easier choice when the backup destination may be an object-storage service or a different operating system. Borg is often the better choice when you control a Linux or Unix backup host and want a fast SSH-based workflow with detailed archive controls.
| Requirement | Prefer restic | Prefer Borg |
|---|---|---|
| Object storage such as S3-compatible storage | Yes | Usually requires another layer |
| Simple installation on several platforms | Yes | Mostly Unix-like systems |
| Backup over SFTP or REST | Yes | SSH is the usual remote method |
| Linux-to-Linux SSH backup | Good | Excellent |
| One repository for many clients | Good | Good, with careful access control |
| Familiar archive and mount workflow | Good | Excellent |
| Minimal client-side configuration | Good | Good |
A practical decision process
Use these questions in order:
- Where will the repository live?
- Which operating systems must the client support?
- How will the backup job authenticate?
- Which restore and administration commands does your team prefer?
- Can you run test restores with the selected tool?
Choose restic when the answer includes S3, Azure Blob, Google Cloud Storage, HTTP, or a portable client. Restic also supports SFTP and local repositories, so choosing it does not prevent a conventional SSH design.
Choose Borg when both ends are under your control, SSH is available, and you want Borg's archive-oriented workflow. Borg can be very efficient for repeated backups of large directory trees. Its repository key and passphrase still need separate protection.
flowchart TD
A[Choose a backup tool] --> B{Need object storage or broad platform support?}
B -->|Yes| C[Choose restic]
B -->|No| D{Linux or Unix hosts with controlled SSH access?}
D -->|Yes| E[Choose Borg or restic]
D -->|No| C
E --> F{Prefer archive-focused SSH workflow?}
F -->|Yes| G[Choose Borg]
F -->|No| H[Choose restic]caption: A simple decision path for selecting restic or Borg alt: Flowchart that directs object-storage and broad-platform needs to restic, and controlled Unix SSH workflows toward Borg
Common errors
Do not confuse a backup tool with a backup plan. Neither tool provides protection if the only repository is on the same disk as the source. Keep at least one copy on another system or site.
Do not select a tool only because its first backup is fast. Compare restore speed, storage cost, authentication, monitoring, and the skills available during an outage.
Do not assume that encryption removes the need for key management. A lost repository passphrase can make every backup unusable. A stolen repository without its passphrase should remain unreadable.
Do not mix repository formats. A restic command cannot read a Borg repository, and Borg cannot restore a restic snapshot. Record the selected tool, repository location, version, and recovery credentials in your operational documentation.
Try both workflows safely
Create test repositories in temporary storage before committing to a production design. The commands below show the shape of each workflow. Use different repository paths for the two tools.
export RESTIC_REPOSITORY=/srv/test-restic
export RESTIC_PASSWORD_FILE=/root/restic-test-password
restic init
restic backup /etc
restic snapshots
export BORG_REPO=/srv/test-borg
export BORG_PASSCOMMAND='cat /root/borg-test-passphrase'
borg init --encryption=repokey-blake2
borg create '::{hostname}-{now:%Y-%m-%dT%H:%M:%S}' /etc
borg listExercise
You manage Linux servers, have an S3-compatible storage service, and need the same client design on Linux and Windows. Which tool is the stronger starting choice, and why?
Show answer
Restic is the stronger starting choice because it supports object-storage backends and has broad platform support. Confirm that its restore workflow and credentials fit the operating process before deploying it.