...
5. Assignment: Make a weekly -Offsite backup of the TownHall
Rdiff-backup
Install rdiff on the server and the working station.
Code Block |
---|
apt-get install rdiff-backup |
and create a backup folder in the server (ex: /backup/servername/)
Login using ssh key
...
As root on the working station create the key
...
do , do not enter any paraphrase.
Code Block |
---|
ssh-keygen -t rsa |
Copy the public key to the
...
server
Code Block |
---|
scp /root/.ssh/id_rsa.pub root@192.168.10.91:/homeroot/ |
Write the public into the .ssh/authorized_keys of the user (in his home folder) you want to login to
Code Block |
---|
cat id_rsa.pub >> /homeroot/bl/.ssh/authorized_keys |
change in /etc/ssh/sshd_config:
...
If ssh doesn't work check the grp and own of .ssh/authorized_keys or check the name of the file...
Create a backup list
/root/rdiff-backups/backup-list-server
Code Block |
---|
/home/
- /
|
Create an ssh alias to access the server
/root/.ssh/config
Code Block |
---|
Host backup-server
Hostname 192.168.10.91
User root
Identityfile /root/.ssh/id_rsa_backup_raspberry
Protocol 2
|
test the backup with:
Code Block |
---|
rdiff-backup --force --include-globbing-filelist /root/rdiff-backups/backup-list-server / backup-server::/backup/raspberry/ |