2023-03-15 10:52:18 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
BINDIR=$(dirname "$0")
|
|
|
|
|
|
|
|
cd "$BINDIR"
|
|
|
|
|
|
|
|
echo "================================================================================"
|
|
|
|
echo " Sauvegardes du "$(date)
|
|
|
|
echo "================================================================================"
|
|
|
|
START_TIME=$(date +"%s")
|
|
|
|
START_SIZE=$(du -s /var/backups/borg/ | awk '{ print $1 }')
|
|
|
|
|
|
|
|
## Local machine.
|
|
|
|
./dobackup-local
|
|
|
|
|
|
|
|
## Libre en Communs machines.
|
|
|
|
# anthea.libre-en-communs.org
|
|
|
|
#systemd ./dobackup-remote aunt.libre-en-communs.org
|
|
|
|
# britt.libre-en-communs.org
|
|
|
|
# fontainebleau
|
|
|
|
# leparc
|
|
|
|
#systemd ./dobackup-remote mother.libre-en-communs.org
|
|
|
|
#systemd ./dobackup-remote dns.libre-en-communs.org
|
|
|
|
#systemd ./dobackup-remote isengard.libre-en-communs.org
|
|
|
|
|
|
|
|
## A-lec
|
|
|
|
#systemd ./dobackup-remote audio.a-lec.org
|
|
|
|
#systemd ./dobackup-remote gestion.a-lec.org
|
|
|
|
#systemd ./dobackup-remote git.a-lec.org
|
|
|
|
#systemd ./dobackup-remote mail.a-lec.org
|
|
|
|
#-toot.a-lec.org
|
|
|
|
#systemd ./dobackup-remote www.a-lec.org
|
|
|
|
#systemd ./dobackup-remote xmpp.a-lec.org
|
|
|
|
|
|
|
|
|
|
|
|
# Chalec
|
|
|
|
#systemd ./dobackup-remote audio.chalec.org
|
|
|
|
#systemd ./dobackup-remote ctrlv.chalec.org
|
|
|
|
#systemd ./dobackup-remote forge.chalec.org
|
|
|
|
#systemd ./dobackup-remote libreverse.chalec.org
|
|
|
|
#-nuage.chalec.org
|
|
|
|
#systemd ./dobackup-remote pad.chalec.org
|
|
|
|
#systemd ./dobackup-remote petition.chalec.org
|
|
|
|
#systemd ./dobackup-remote stats.chalec.org
|
|
|
|
#systemd ./dobackup-remote status.chalec.org
|
|
|
|
#-toot.chalec.org
|
|
|
|
#-video.chalec.org
|
|
|
|
#systemd ./dobackup-remote visio.chalec.org
|
|
|
|
#systemd ./dobackup-remote www.chalec.org
|
|
|
|
#systemd ./dobackup-remote xmpp.chalec.org
|
|
|
|
|
|
|
|
DURATION=$(($(date +"%s")-$START_TIME))
|
|
|
|
DURATION=$(printf "%02d:%02d:%02d" $((DURATION/60/60)) $((DURATION/60%60)) $((DURATION%60)))
|
|
|
|
echo "Midded at: "$(date)" Duration: $DURATION"
|
|
|
|
|
|
|
|
# Wait the end of remote Systemd timer backup (5 hours).
|
2023-03-15 10:53:50 +01:00
|
|
|
# Useful to have good data in report.
|
2023-03-15 10:52:18 +01:00
|
|
|
sleep 18000
|
|
|
|
|
|
|
|
./doreport
|
|
|
|
|
|
|
|
echo "====="
|
|
|
|
DURATION=$(($(date +"%s")-$START_TIME))
|
|
|
|
DURATION=$(printf "%02d:%02d:%02d" $((DURATION/60/60)) $((DURATION/60%60)) $((DURATION%60)))
|
|
|
|
END_SIZE=$(du -s /var/backups/borg/ | awk '{ print $1 }')
|
|
|
|
DIFF_SIZE=$(((END_SIZE-START_SIZE)/1024))
|
|
|
|
echo "Ended at: "$(date)" Duration: $DURATION Size: $DIFF_SIZE MB"
|
|
|
|
echo "================================================================================"
|