Skip to content

Directory backup over network

Instructions on Using the rdiff-backup Tool

Full documentation available at https://rdiff-backup.net/.
The aim is to perform a backup from folder on system A to system B using asymmetric key encryption.

  • Package Installation:
apt install rdiff-backup
  • On system A, as the root user, generate an asymmetric key. Example command:
ssh-keygen -f ~/.ssh/id_rsa -t rsa -b 2048 -q -P ""
  • Copy the public key to system B into the /.ssh/authorized_keys folder for a user with standard permissions, such as "ubuntu".
  • On system B, create a directory for backup purposes and assign permissions to the ubuntu user:

mkdir /sslwww
chown ubuntu /sslwww/
* Example command to copy the content of /etc/letsencrypt/archive/www.manual.pietaadmin.pl from system A to the /sslwww directory on system B:

rdiff-backup /etc/letsencrypt/archive/www.manual.pietaadmin.pl/ ubuntu@150.254.225.223::/rdbackup
  • Automate the task using cron: