vs2-free-users
Active Member
Quick guide Debian borgbackup on server
Foreword
!!!IMPORTANT!!!
This is only a guide, everyone is the architect of his own fortune, think about what you are doing and test it with unimportant data. I AM NOT LIABLE FOR ANY LOSS OF DATA!
Since I have recently rebuilt my mail server and now want to set up a correspondingly newer backup system, I will write down my findings right away.
Since the vs2-free are mainly equipped with IPv6, I will always use the IPv6 version.
Setup (pure test setup mail server is a VS2-428 not vs2-free)
Host A vs2-free with booked and configured IPv4. Operating system Debian 12 (Bookworm) - 64Bit - minimal v4.
Host B vs2-cloud with booked and configured IPv4. Operating system Debian 12 (Bookworm) - 64bit - minimal v4.
Host A is the server to be backed up.
Host B is the server where the backups are located.
In my experiment, I only ever backed up /home1. Of course, it also works with other directories.
- Host B: Perform update and restart
- Host B: Install Borg Backup
- Host B: Set up Borg Backup repo and make a note of the password
- Host A: Perform update and restart
- Host A: Install Borg Backup
- Set up SSH key authentication on host B (server) and host A (client)
- Host A: Create backup (is repeated for each backup, preferably as a daily cron job)
- Host A: Display backup statuses and search for the correct one
- Host A: Restore the wanted backup
Foreword
!!!IMPORTANT!!!
This is only a guide, everyone is the architect of his own fortune, think about what you are doing and test it with unimportant data. I AM NOT LIABLE FOR ANY LOSS OF DATA!
Since I have recently rebuilt my mail server and now want to set up a correspondingly newer backup system, I will write down my findings right away.
Since the vs2-free are mainly equipped with IPv6, I will always use the IPv6 version.
Setup (pure test setup mail server is a VS2-428 not vs2-free)
Host A vs2-free with booked and configured IPv4. Operating system Debian 12 (Bookworm) - 64Bit - minimal v4.
Host B vs2-cloud with booked and configured IPv4. Operating system Debian 12 (Bookworm) - 64bit - minimal v4.
Host A is the server to be backed up.
Host B is the server where the backups are located.
In my experiment, I only ever backed up /home1. Of course, it also works with other directories.
- Host B: Perform update and restart
Code:
apt update
apt -y upgrade
reboot
- Host B: Install Borg Backup
Code:
apt install borgbackup
- Host B: Set up Borg Backup repo and make a note of the password
Code:
mkdir -p /home/borgbackup/repo
borg init --encryption=repokey /home/borgbackup/repo
- Host A: Perform update and restart
Code:
apt update
apt -y upgrade
reboot
- Host A: Install Borg Backup
Code:
apt install borgbackup
- Set up SSH key authentication on host B (server) and host A (client)
https://linux.org/threads/quick-start-guide-setting-up-ssh-key-authentication-on-a-rootserver.46170/
- Host A: Create backup (is repeated for each backup, preferably as a daily cron job)
Code:
BORG_PASSPHRASE='<PASSWORD>' borg create --numeric-ids root@[<IPv6 Host B>]:/home/borgbackup/repo::backup-"$(date +'%Y-%m-%d-%H-%M-%S')" /home1
- Host A: Display backup statuses and search for the correct one
Code:
BORG_PASSPHRASE='<PASSWORD>' borg list root@[<IPv6 Host B>]:/home/borgbackup/repo
- Host A: Restore the wanted backup
Code:
cd /
BORG_PASSPHRASE='<PASSWORD>' borg extract --numeric-ids root@[<IPv6 Host B>]:/home/borgbackup/repo::<wanted backup>