From 9d3a7837061f746de925bb3c20f229700fd6a966 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Tue, 21 Mar 2023 16:42:01 +0100 Subject: [PATCH] Improved Plan B scripts. --- Plan Borg/bin/dobackups | 45 +++++++++++------------------------------ Plan Borg/bin/doprunes | 2 +- 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/Plan Borg/bin/dobackups b/Plan Borg/bin/dobackups index b672e5c..986f89d 100755 --- a/Plan Borg/bin/dobackups +++ b/Plan Borg/bin/dobackups @@ -10,44 +10,23 @@ echo "========================================================================== START_TIME=$(date +"%s") START_SIZE=$(du -s /var/backups/borg/ | awk '{ print $1 }') +## Fix owner. +chown -R borg.borg /var/backuprs/borg/ + ## Local machine. ./dobackup-local -## Libre en Communs machines. -# anthea.libre-en-communs.org -##./dobackup-remote aunt.libre-en-communs.org -# britt.libre-en-communs.org -# fontainebleau -# leparc -##./dobackup-remote mother.libre-en-communs.org -./dobackup-remote dns.libre-en-communs.org -./dobackup-remote isengard.libre-en-communs.org +## Rsync machines. +./dobackup-rsync leparc.libre-en-communs.org +./dobackup-rsync fontainebleau.libre-en-communs.org -## A-lec -./dobackup-remote audio.a-lec.org -./dobackup-remote gestion.a-lec.org -./dobackup-remote git.a-lec.org -./dobackup-remote mail.a-lec.org -#-toot.a-lec.org -./dobackup-remote www.a-lec.org -./dobackup-remote xmpp.a-lec.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" - -# Chalec -./dobackup-remote audio.chalec.org -./dobackup-remote ctrlv.chalec.org -./dobackup-remote forge.chalec.org -./dobackup-remote libreverse.chalec.org -#-nuage.chalec.org -./dobackup-remote pad.chalec.org -./dobackup-remote petition.chalec.org -./dobackup-remote stats.chalec.org -./dobackup-remote status.chalec.org -#-toot.chalec.org -#-video.chalec.org -./dobackup-remote visio.chalec.org -./dobackup-remote www.chalec.org -./dobackup-remote xmpp.chalec.org +# Wait the end of remote Systemd timer backup (5 hours). +# Useful to have good data in report. +sleep 18000 ./doreport diff --git a/Plan Borg/bin/doprunes b/Plan Borg/bin/doprunes index 591ddc4..b06b1de 100755 --- a/Plan Borg/bin/doprunes +++ b/Plan Borg/bin/doprunes @@ -6,7 +6,7 @@ echo "========================================================================== START_TIME=$(date +"%s") START_SIZE=$(du -s /var/backups/borg/ | awk '{ print $1 }') -borgmatic prune --stats --files --verbosity 1 +borgmatic prune --stats --list --verbosity 1 # Only last borgmatic version has the compact command. cd /var/backups/borg/