]> arthur.barton.de Git - backup-script.git/blobdiff - bin/backup-status
backup-script-wrapper: Use "exec" to redirect output
[backup-script.git] / bin / backup-status
index 32ef7c471f2660f2a71c461e8e497bbad7875dba..4a181801b21537f700ee677932c568a888f4101b 100755 (executable)
@@ -34,7 +34,7 @@ Check_Size() {
        # $2: padding
 
        if [ "$QUICK" = "0" ]; then
-               size=`du -sh "$1" | cut -f1`
+               size=`du -Hhs "$1" | cut -f1`
                echo "$2  - Size:" $size
        fi
 }
@@ -112,7 +112,7 @@ for f in $sys; do
        [ "$system" = "localhost" -o "$system" = "127.0.0.1" ] && local=1
 
        destdir="$target"
-       target="$target/$fname"
+       target="$target/$system"
 
        [ -d "$target" ] || continue
 
@@ -123,7 +123,8 @@ for f in $sys; do
        echo "- Target: $target"
 
        if [ $generations -gt 0 ]; then
-               for s in $target/[0-9]*-[0-9]*; do
+               for s in $target/current $target/[0-9]*-[0-9]*; do
+                       [ -e "$s" ] || continue
                        echo "  - Snapshot: $s"
                        Check_Size "$s" "  "
                        Check_Stamp "$s/.stamp" "  "