Serveur rsync

Fonctionne avec tout Synology DS, solution de sauvegarde brut, pas d’historique, pas de système incrémentiel ou différentiel.

Rappel :

  • Différentiel : sauvegarde relative à l’enregistrement initial, plus couteux en termes d’espace disque mais plus sûr.
  • Incrémentiel : sauvegarde relative à l’enregistrement précédant, en général J-1.

Configurer le mode serveur

  • fichier /etc/default/rsync, option à modifier
RSYNC_ENABLE=true
  • Fichier /etc/rsyncd.conf
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
use chroot = no

[PVE]
path = /volume1/PVE
comment = PVE Backup
uid = rsync
gid = rsync
read only = no

Lancer le daemon sans le script /etc/init.d/rsync

rsync --daemon

Planification avec cron

  • Attention au :: pour designer un dépôt distant
# Use the hash sign to prefix a comment
# +---------------- minute (0 - 59)
# |  +------------- hour (0 - 23)
# |  |  +---------- day of month (1 - 31)
# |  |  |  +------- month (1 - 12)
# |  |  |  |  +---- day of week (0 - 7) (Sunday=0 or 7)
# |  |  |  |  |
# *  *  *  *  *  command to be executed
  0  3  *  *  1  rsync -avrzhcp --exclude ${CHAINE1} --exclude ${CHAINE2} ${SOURCES} rsync@${IP_DEST}::PVE --progress -v --stats  --delete --log-file=/var/log/rsync-pve.log

Port

  • TCP : 873