borg backup exmaple

Borg backup examples and tutorials 2025

Corrected the spelling of 'example' and added 'tutorials' to focus on instructional content, as well as the current year to yield the most relevant and up-to-date results.

Understanding Borg Backup: A Comprehensive Guide with Examples

BorgBackup, commonly referred to as Borg, is a powerful, open-source backup solution designed for efficient storage and management of backups through features like deduplication, compression, and encryption. This guide aims to provide you with practical examples of using Borg Backup, from installation to creating and restoring backups.

What is BorgBackup?

BorgBackup is a deduplicating archiver that focuses on efficient storage. It ensures that only unique data is stored in the backup repository, minimizing space usage and enhancing the speed of backup operations. It supports various functionalities, making it a preferred choice for individuals and system administrators alike.

Key Features of BorgBackup

  • Deduplication: Only unique data is saved, reducing storage requirements.
  • Compression: Optional data compression to save space.
  • Encryption: Backups can be encrypted for enhanced security.
  • Efficient Remote Backups: Capable of backing up data over SSH to remote servers.

Installation of BorgBackup

Before initiating backups, it's essential to install Borg. Here's a streamlined installation guide for popular Linux distributions:

Debian/Ubuntu

sudo apt update
sudo apt install borgbackup

CentOS/RHEL

sudo yum install epel-release
sudo yum install borgbackup

Arch Linux

sudo pacman -S borg

For detailed information on installation on various systems, refer to the official documentation on Borg Backup Quick Start [2].


Creating a Backup Repository

Once Borg is installed, you'll need to create a backup repository. This repository will store your backups.

borg init --encryption=repository /path/to/your/repository

Replace /path/to/your/repository with your desired path. The --encryption=repository option enables encryption on the repository level.

Example: Backing Up Files

To back up a directory (e.g., /home/user/documents), use the following Borg command:

borg create --progress /path/to/your/repository::my-backup-{now:%Y-%m-%d} /home/user/documents
  • /path/to/your/repository: Your Borg repository path.
  • my-backup-{now:%Y-%m-%d}: This creates a backup archive named with the current date.

Pruning Old Backups

Periodically, it's essential to manage your backup repository to save space. Borg provides a pruning feature:

borg prune --list /path/to/your/repository --keep-daily=7 --keep-weekly=4 --keep-monthly=12

This command keeps the last seven daily backups, four weekly, and twelve monthly backups.

Restoring Backups

Restoring files from a Borg backup is straightforward. To extract a specific backup, you can use:

borg extract /path/to/your/repository::my-backup-2025-08-18

This command will restore the backup made on August 18, 2025, to the current directory.


Additional Resources and Learning

If you're looking for deeper dives into BorgBackup, consider these resources:

  • Video Tutorial: A visual guide to setting up and using Borg can be found on YouTube [1].
  • Detailed Installation Guide: For configuration assistance, check out Hetzner [5].
  • Managing Backups: For comprehensive management tips, visit Synaptica [7].

Conclusion

BorgBackup is an excellent tool for anyone looking to implement an efficient and robust backup solution. With its features of deduplication, encryption, and ease of use, it stands out as a top choice for personal or professional backup needs. By following the above examples, you can quickly set up, maintain, and restore your data, ensuring your information remains secure and accessible. For further exploration, refer to the official documentation and community forums for support and advanced techniques.

Sources

10
1
Master BorgBackup 1.4.0: Init, Create, Prune, Remote SSH, ...
YouTube

Learn how to: • Init: Set up your first Borg repository. And encrypt your backups • Create: Back up your files like a pro. Prune: Manage and ...

2
Quick Start — Borg - Deduplicating Archiver 1.4.1 ...
Borgbackup

A Borg archive is the result of a single backup ( borg create ). An archive stores a snapshot of the data of the files “inside” it.

3
Install Borg on Linux for Efficient Backups
Linuxconfig

In this tutorial we are going to see how to install Borg on some of the most used Linux distributions, and some examples of its usage.

4
Backing Up to an External Server With Borg
Rc

borg is a deduplicating, compressing, encrypting backup program that can work locally or over SSH. You will need either a Linux server running SSHD or an ...

5
Install and Configure BorgBackup
Community

A tutorial on installing and configuring BorgBackup, including lots of additional hints.

6
BorgBackup in 2025: Efficient Compression and ...
Mangohost

Conclusion & Recommendations. Here's the bottom line: In 2025, BorgBackup is the go-to tool for sane, efficient Linux server backups. It's open-source, fast, ...

7
Guide to Managing Backups with BorgBackup
Synaptica

BorgBackup is a powerful tool for managing incremental and compressed backups. It can be easily automated with cron jobs or scripts.

8
How to restore borg backups? - Andrey Albershtein
Alberand

How to restore borg backups? 03.06.2025. Borg is pretty good backup solution. I use it with BorgBase to backup my database for side projects ...

9
Backing Up With Borg
Materials

BorgBackup, or “Borg” for short, is a backup program that supports deduplication, compression, and encryption. Borg provides an efficient and ...

10
How to back up and restore Nextcloud AIO remotely using ...
Nextcloud

In this step-by-step guide, we explore how to create a remote Nextcloud backup and restore your instance from one.