BorgBackup is a deduplicating backup program. Compression and authenticated encryption are also supported as options.
Step 1 - Installation
Some distributions might offer a ready-to-use BorgBackup package which can be installed with the package manager.
Debian/Ubuntu:
apt install borgbackup
RHEL/AlmaLinux/Fedora:
dnf install borgbackup
Create backup folder
mkdir /mnt/backup
Step 2 - Workflow with BorgBackup
Backup ~/Documents into an archive named "documents"
borg create /mnt/backup::documents-{now:%Y-%m-%d} ~/Documents
Full system backup
If you want to backup the entire system on your Linux server, you should remember that not all files and folders belong in a backup. Some should be excluded by default.
For this, the create command has an --exclude option or you can specify an exclude file.
Here is an example call to BorgBackup create for a backup of the complete system:
borg create -v --stats \/mnt/backup::'{now:%Y-%m-%d_%H:%M}' \/ \--exclude /dev \--exclude /proc \--exclude /sys \--exclude /var/run \--exclude /run \--exclude /lost+found \--exclude /mnt