Improved Plan B scripts.
This commit is contained in:
parent
fb94d0d2de
commit
08841220ab
|
@ -23,11 +23,9 @@ if (( $help )); then
|
||||||
else
|
else
|
||||||
COMPUTER="$1"
|
COMPUTER="$1"
|
||||||
|
|
||||||
echo "== Create the mirroring directory."
|
echo "== Create the mirroring directories."
|
||||||
mkdir -p /var/backups/borg/mirrors/${COMPUTER}
|
mkdir -p /var/backups/borg/mirrors/${COMPUTER}/{mirror,cache}
|
||||||
|
chown -R borg.borg /var/backups/borg/mirrors/${COMPUTER}
|
||||||
echo "== Create dedicated cache."
|
|
||||||
mkdir /var/backups/borg/mirrors/${COMPUTER}.cache
|
|
||||||
|
|
||||||
echo "== Create the borgmatic configuration file."
|
echo "== Create the borgmatic configuration file."
|
||||||
cp /srv/borg/models/model-conf-rsync.yaml /etc/borgmatic.d/${COMPUTER}.yaml
|
cp /srv/borg/models/model-conf-rsync.yaml /etc/borgmatic.d/${COMPUTER}.yaml
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PORT=222
|
PORT=222
|
||||||
BACKUP_SERVER=sauvkipeu.libre-en-communs.org
|
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
|
#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/
|
||||||
|
|
|
@ -8,7 +8,7 @@ location:
|
||||||
storage:
|
storage:
|
||||||
encryption_passcommand: 'cat /srv/borg/.borg-passphrase'
|
encryption_passcommand: 'cat /srv/borg/.borg-passphrase'
|
||||||
archive_name_format: '{now:%Y-%m-%dT%H:%M}'
|
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:
|
retention:
|
||||||
!include /etc/borgmatic/retention.yaml
|
!include /etc/borgmatic/retention.yaml
|
||||||
|
|
Loading…
Reference in New Issue