Improved Plan B scripts.

This commit is contained in:
Christian P. MOMON 2023-03-19 01:43:43 +01:00
parent fb94d0d2de
commit 08841220ab
3 changed files with 6 additions and 8 deletions

View File

@ -23,11 +23,9 @@ if (( $help )); then
else
COMPUTER="$1"
echo "== Create the mirroring directory."
mkdir -p /var/backups/borg/mirrors/${COMPUTER}
echo "== Create dedicated cache."
mkdir /var/backups/borg/mirrors/${COMPUTER}.cache
echo "== Create the mirroring directories."
mkdir -p /var/backups/borg/mirrors/${COMPUTER}/{mirror,cache}
chown -R borg.borg /var/backups/borg/mirrors/${COMPUTER}
echo "== Create the borgmatic configuration file."
cp /srv/borg/models/model-conf-rsync.yaml /etc/borgmatic.d/${COMPUTER}.yaml

View File

@ -1,6 +1,6 @@
#!/bin/bash
PORT=222
BACKUP_SERVER=sauvkipeu.libre-en-communs.org
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}:/var/backups/borg/mirrors/${HOSTNAME}.libre-en-communs.org/
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/
#BACKUP_SERVER=gardefou.libre-en-communs.org
#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}:/var/backups/borg/mirrors/${HOSTNAME}.libre-en-communs.org/
#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/

View File

@ -8,7 +8,7 @@ location:
storage:
encryption_passcommand: 'cat /srv/borg/.borg-passphrase'
archive_name_format: '{now:%Y-%m-%dT%H:%M}'
borg_cache_directory: /var/backups/borg/mirrors/<HOSTNAME>.cache
borg_cache_directory: /var/backups/borg/mirrors/<HOSTNAME>/cache
retention:
!include /etc/borgmatic/retention.yaml