Plan borg: improved script.
This commit is contained in:
parent
a81dd6f29c
commit
2d6daa50f5
|
@ -6,7 +6,14 @@ echo "==========================================================================
|
||||||
START_TIME=$(date +"%s")
|
START_TIME=$(date +"%s")
|
||||||
START_SIZE=$(du -s /var/backups/borg/ | awk '{ print $1 }')
|
START_SIZE=$(du -s /var/backups/borg/ | awk '{ print $1 }')
|
||||||
|
|
||||||
borgmatic prune --stats --files --verbosity 1
|
#borgmatic prune --stats --files --verbosity 1
|
||||||
|
|
||||||
|
# Only last borgmatic version has the compact command.
|
||||||
|
cd /var/backups/borg/
|
||||||
|
for REPO in $( ls -d *.repo ); do
|
||||||
|
echo "Compact $REPO"
|
||||||
|
borg compact "$REPO"
|
||||||
|
done
|
||||||
|
|
||||||
echo "====="
|
echo "====="
|
||||||
DURATION=$(($(date +"%s")-$START_TIME))
|
DURATION=$(($(date +"%s")-$START_TIME))
|
||||||
|
|
Loading…
Reference in New Issue