wiki:howto/RsyncBackup

Rsync backup van alle user data met monitoring

vanaf syn3 versie 4.5 is deze functionaliteit onderdeel van de reguliere backup instellingen in de control center

  • Fix een ssh key naar de server die je wilt backuppen:
    [Syn-3] root@backup.asdf.nl /etc/cron.daily# ssh-keygen
    Generating public/private rsa key pair.
    Enter file in which to save the key (/root/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /root/.ssh/id_rsa.
    Your public key has been saved in /root/.ssh/id_rsa.pub.
    The key fingerprint is:
    88:15:b5:75:0e:ed:93:0a:1f:8f:36:78:55:d6:29:db root@backup
    [Syn-3] root@backup.asdf.nl /etc/cron.daily# cat ~/.ssh/id_rsa.pub | ssh root@192.168.1.160 "cat >> ~/.ssh/authorized_keys"
    root@192.168.1.160's password:
    [Syn-3] root@backup.asdf.nl /etc/cron.daily# ssh root@192.168.1.160
    Last login: Tue Mar  3 12:44:06 2009 from 192.168.5.11
    Linux.
    ... (inloggen zonder password nu mogelijk)
    
  • Maak een user 'backup' op de backup server aan via de SCC
  • Plaats dit script in /etc/cron.daily en pas het aan:
    NAME=emmen
    IP=192.168.1.160
    if rsync -avx $IP:/home /home/users/backup; then
     /sbin/syn3-state --force rsync-$NAME OK "mirror backup `date` gelukt"
    else
     /sbin/syn3-state --force rsync-$NAME ALERT "mirror backup `date` mislukt!"
    fi
    

Niet vergeten de x-bit te zetten!

  • Test het script:
    [Syn-3] root@backup.asdf.nl /etc/cron.daily# ./emmenbackup.sh
    receiving file list ... done
    home/shares/...
    
    
Last modified 9 years ago Last modified on 01/21/16 12:06:19