This is an old revision of the document!
Let's start with rsnapshot. Before you begin, you must already know how to add a hard drive to your system, a mount point, and an appropriate fstab entry. To create a basic configuration, do the following:
sudo apt install rsnapshot nano /etc/rsnapshot.conf <rsnapshot_root /enter-mount-point-here>
Uncomment the alpha, beta, gamma, and delta sections under backup levels section, enable the sync-first option, and specify the directories you want to backup (remember, localhost
, calls whatever you have above in rsnapshot_root
from above):
<retain alpha 6> <retain beta 7> <retain gamma 4> <retain delta 3> <sync_first 1> <backup /home/ localhost> <backup /etc/ localhost>
Making an rsync over ssh mirror using alternate port and the old syntax.
From remote server to target backup localhost:
rsync -av --delete -e 'ssh -p 59333 -i /home/user/.ssh/id_rsa' user@10.8.9.3:/home/user/Server/ /home/user/Server/
From localhost to target remote backup server:
rsync -av --delete -e 'ssh -p 59333 -i /home/user/.ssh/id_rsa' /home/user/Server/ user@10.8.9.3:/home/user/Server/
– – – – –
Using the more modern syntax and no alternate port, we have:
From remote server to target backup localhost:
sudo rsync -avi --delete root@server.com:/home/location/of/mysqldump.sql /home/user/backup/of/mysqldump.sql
From localhost to target remote backup server:
sudo rsync -avi --delete /home/user/backup/of/mysqldump.sql root@server.com:/home/location/of/mysqldump.sql
This tutorial is a designated “Invariant Section” of the “Technotronic” section of Haack's Wiki as described on the Start Page.
— oemb1905 2019/07/31 09:53