From 079c398030c3e6e816a5563fb013b5394c903920 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 21 May 2020 10:33:28 +0200 Subject: [PATCH] new: added ``rsync-backup`` instructions to add backup to services. Signed-off-by: Valentin Lab --- README.org | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.org b/README.org index e695602..6a08295 100644 --- a/README.org +++ b/README.org @@ -613,6 +613,44 @@ PGHOST=172.19.0.2 PGUSER=postgres pgm ls tail -f /srv/datastore/data/cron/var/log/cron/letsencrypt-renew_script.log -n 200 #+END_SRC +*** rsync-backup + +**** Installation du backup + +A faire depuis le serveur ayant des services à backupper. + +Il y a une partie à copier-coller sur le serveur de backup. + +Ne pas oublier de relancer le serveur de backup pour le prendre en compte. + +#+begin_src sh +DOMAIN=xxx.fr +BACKUP_SERVER=core-06.0k.io:10023 + +ssh-keygen -t rsa -N "" -f /root/.ssh/rsync_rsa -C "rsync@$DOMAIN" +cat <> /opt/apps/myc-deploy/compose.yml + +rsync-backup: + options: + ident: $DOMAIN + target: $BACKUP_SERVER + private-key: | +$(cat /root/.ssh/rsync_rsa | sed -r 's/^/ /g') +EOF + +echo "copier-coller ceci dans le '/etc/compose/compose.yml' de ${BACKUP_SERVER%:*}:" +echo +cat <