compact eingefügt, wenn v>1.1
This commit is contained in:
@@ -184,9 +184,17 @@ borg_info() {
|
||||
borg_prune() {
|
||||
echo "Bereinige das Backup-Repository..."
|
||||
$BORG prune -v --list $BORG_PRUNING "$BORG_REPO"
|
||||
echo "Compactiere das Backup-Repository..."
|
||||
# Borg compact command is used to reduce the size of the repository by removing unused data.
|
||||
|
||||
BORG_VERSION=$($BORG -V 2>/dev/null | grep -oE '[0-9]+\.[0-9]+')
|
||||
MAJOR=$(echo $BORG_VERSION | cut -d. -f1)
|
||||
MINOR=$(echo $BORG_VERSION | cut -d. -f2)
|
||||
if [ "$MAJOR" -gt 1 ] || ([ "$MAJOR" -eq 1 ] && [ "$MINOR" -ge 2 ]); then
|
||||
echo "Borg $BORG_VERSION: führe compact aus"
|
||||
$BORG compact "$BORG_REPO"
|
||||
else
|
||||
echo "Borg $BORG_VERSION: compact nicht unterstützt, da älter als 1.2"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# auflisten von Borg-Sicherungen
|
||||
|
||||
Reference in New Issue
Block a user