Marcio Cunha

Restic, Borg and Kopia: Modern Backup Tools for Linux Servers

Explore the architectural differences between Restic, Borg Backup, and Kopia. Compare costs, performance, and deduplication for Linux servers.

Marcio Cunha12 min
Also available in:EspañolPortuguês
Summary
  • Efficient deduplication drastically reduces disk space consumption by storing only unique data blocks.
  • The Borg ecosystem excels in compression and encryption maturity, requiring the binary on both ends.
  • End-to-end encrypted tools guarantee data security even when utilizing third-party cloud storage providers.
  • Kopia offers an intuitive web UI and native support for multiple concurrent storage backends.
  • Selecting the ideal backup software depends on balancing RAM usage, restore speed, and operational simplicity.

The Silent Challenge of Data Integrity in Servers

Keeping Linux servers running smoothly is only half the job for any system administrator or infrastructure engineer. The other half, frequently ignored until disaster strikes, involves ensuring that every critical file can be rapidly restored after a hardware failure, cyber attack, or catastrophic human error. In practice, this means that a system without a reliable backup strategy is merely a ticking time bomb waiting for the right moment to go off.

Historically, traditional solutions like the classic tar combined with gzip compression got the job-as long as you accepted copying entire data sets on every execution, wasting valuable time and disk space. As information volume grew exponentially across businesses and personal projects, storing dozens of identical complete copies became utterly unsustainable. This urgent need for optimization drove the emergence of modern backup tools focused on spatial efficiency and rigorous algorithmic security.

Understanding Deduplication and End-to-End Encryption

To understand how modern tools operate, we must demystify deduplication, which is the intelligent process of slicing files into tiny pieces called chunks and saving only the unique variations of those pieces. In practice, if you change a single line in a multi-gigabyte document, the system won't create a massive new copy, but will instead record only the modified fragment. This saves precious gigabytes on local disks and cuts down network traffic when transmitting data to the cloud.

Another fundamental pillar of these modern solutions is end-to-end encryption (E2EE), a mathematical mechanism that scrambles your data directly on the source server before transmitting it to the destination. This means that even if an attacker manages to breach your cloud storage provider, they will only see a sea of meaningless code, protecting your privacy against unwanted eyes. The key to decrypting this information remains exclusively with you, guarded by a robust master password.

Restic, Portability, and the Power of Go

Restic has quickly established itself as a community favorite due to its minimalist architecture and impressive portability, distributed as a single executable compiled in Go. In practice, you do not need to install complex dependencies or configure heavy local databases to start protecting your directories. It handles the repository independently, allowing you to store backups on SFTP servers, Amazon S3, Google Cloud Storage, or a simple local directory on the same disk.

One of Restic's greatest strengths is how easily it handles versioning and mounting snapshots as virtual filesystems via FUSE, allowing you to browse your data history as if they were ordinary folders. However, Restic carries a known trade-off: it consumes significant RAM during the initial indexing phase of very large repositories. For resource-constrained servers, this behavior requires prior planning to avoid unexpected performance bottlenecks.

restic -r /srv/backup-repo init
restic -r /srv/backup-repo --password-file /etc/restic-pass backup /var/www
restic -r /srv/backup-repo snapshots

Borg Backup, Performance, and the Python Ecosystem

Borg Backup is a respected veteran in the Linux world, known for its robustness and for introducing enterprise-grade compression and deduplication features. Developed with critical parts in C and Python, Borg requires the binary to be present on both the source machine and the destination server to perform optimized processing on the remote side. This architectural requirement might look like an initial hurdle, but it amply pays off by drastically reducing the amount of data transferred across the network.

Snapshot management in Borg is extremely flexible, allowing automated retention policies to expire old backups based on daily, weekly, and monthly criteria very elegantly. However, it is worth noting that Borg was not natively designed for object storage services like S3 without the aid of third-party tools to mount block storage filesystems, focusing primarily on traditional SSH servers.

borg init -e repokey /path/to/repo
borg create /path/to/repo::{now:%Y-%m-%d_%H:%M} /home/user
borg list /path/to/repo

Kopia, Extreme Speed, Web UI, and Flexibility

Kopia emerges as a newer alternative heavily focused on raw performance, concurrency, and storage flexibility, built to handle millions of small files with impressive ease. One of its most striking features is the optional inclusion of an integrated web GUI, allowing administrators to monitor backup policies, verify integrity status, and perform restores without relying exclusively on the command line.

Architecturally, Kopia supports a massive array of native backends, ranging from local storages to complex cloud providers, maintaining an intelligent local cache to speed up search and verification operations. It also shines in task parallelization, leveraging multiple processing cores to accelerate simultaneous compression and encryption. As a downside, the wide variety of configuration options can present a slightly steeper learning curve for beginners.

kopia repository create filesystem --path=/var/kopia-repo
kopia snapshot create /var/log
kopia snapshot list

Practical Criteria for Choosing the Ideal Tool

Choosing between Restic, Borg, and Kopia should not be based on hype, but rather on the real constraints of your production environment and specific recovery requirements. If you need easy deployment without dependencies and native compatibility with multiple object cloud services, Restic is usually the most pragmatic and straightforward choice for lean teams.

On the other hand, if your scenario involves dedicated servers interconnected via SSH with a focus on maximum compression efficiency and rigorous history, Borg retains its crown as a time-tested armored solution. Meanwhile, Kopia shines brightly in environments demanding extreme concurrency, parallel processing speed, and the convenience of a visual interface for continuous operational monitoring.

Final Considerations on Recovery Strategies

Implementing a modern backup tool like Restic, Borg, or Kopia is merely the first step toward real operational resilience in a Linux-based infrastructure. The true litmus test of any data protection system is not the successful execution of the nightly backup, but rather the speed and reliability with which you can restore files in a crisis moment. Test your restores regularly and remember that a backup that has never been tested for recovery simply does not exist.