sauvegardes/bin/push-mirror

8 lines
452 B
Plaintext
Raw Permalink Normal View History

2023-03-18 20:17:53 +01:00
#!/bin/bash
PORT=222
2023-03-19 02:18:07 +01:00
for BACKUP_SERVER in sauvkipeu.libre-en-communs.org gardefou.libre-en-communs.org; do
rsync -aq -e "ssh -p ${PORT} -i /root/.ssh/backup_ssh_key" --numeric-ids --update --delete --delete-after --exclude '/dev/' --exclude '/proc/' --exclude '/sys/' / borg@${BACKUP_SERVER}:/mirror/
done
2023-03-19 09:44:47 +01:00
# Don't be afraid by the rsync destination. The authorized_keys in backup server contains a rrsync restriction which fix the good directory.