]> arthur.barton.de Git - backup-script.git/commitdiff
Filesystem summary: Use "zfs list" on ZFS filesystems
authorAlexander Barton <alex@barton.de>
Mon, 24 Aug 2015 08:24:41 +0000 (10:24 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 24 Aug 2015 08:24:41 +0000 (10:24 +0200)
bin/backup-script

index d28a4d8fc3b570ddf37a8c536c2c73326ec7da8d..cf61a7225ef714ba5e42916bfadb9b2dad12500e 100755 (executable)
@@ -619,10 +619,27 @@ done
 
 sync
 
-paths=$( echo $destinations | sed -e 's/ /\n/g' | sort | uniq )
-if [ "$DRYRUN" -eq 0 -a -n "$paths" ]; then
-       df -h $paths
-       echo
+if [ "$DRYRUN" -eq 0 ]; then
+       paths=""
+       paths_zfs=""
+       for dest in $(echo $destinations | sed -e 's/ /\n/g' | sort | uniq); do
+               fs=$(GetFS "$dest")
+               case $fs in
+                 "zfs" )
+                       paths_zfs="$paths_zfs $dest"
+                       ;;
+                 *)
+                       paths="$paths $dest"
+               esac
+       done
+       if [ -n "$paths" ]; then
+               df -h $paths
+               echo
+       fi
+       if [ -n "$paths_zfs" ]; then
+               zfs list $paths_zfs
+               echo
+       fi
 fi
 
 CleanUp