Using Borg Backup for your backups

Procédure

Introduction

Borg Backup is a deduplicated backup program that provides data compression and authenticated encryption. It is designed to provide an efficient and secure way of backing up data, with a deduplication technique that makes it suitable for everyday backups.

Requirements

  • A Linux/Unix operating system.
  • Python 3.8.0 or higher.
  • Administrator rights on the machine where the backup will be performed.

Installation

Via the package manager

⌨ Command
# On Debian/Ubuntu apt install borgbackup # On Fedora dnf install borgbackup # On Arch Linux pacman -S borg

For other distributions, please consult the official Borg documentation for specific commands.

Standalone installation

Download the binary compatible with your system from the Borg GitHub releases page and follow the instructions to make it executable.

From source

  1. Install the necessary dependencies such as Python, OpenSSL and development headers.
  2. Use pip to install Borg Backup.

Initial configuration

Initialise your backup repository with the following command:

⌨ Command
borg init -e repokey /path/to/depot

Creating backups

Create a backup archive by running :

⌨ Command
borg create /path/vers/depot::ArchiveName /path/vers/data

Restore

To restore from a backup archive :

⌨ Command
borg extract /path/to/depot::ArchiveName

Automating backups

Use cron or systemd to schedule your backups regularly.

Maintenance

Clean up old backups with the borg prune command and check the integrity of archives with borg check.

Conclusion

For detailed instructions and to resolve common problems, please consult the official Borg Backup documentation and FAQ.

help.lws.net/a/1808
Was this article helpful?

Yes

No

Read 12 084 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.