From c0e1055b5e32b4a9b112cc5c07cf917989bae732 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 24 Aug 2015 10:24:41 +0200 Subject: [PATCH] Filesystem summary: Use "zfs list" on ZFS filesystems --- bin/backup-script | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/bin/backup-script b/bin/backup-script index d28a4d8..cf61a72 100755 --- a/bin/backup-script +++ b/bin/backup-script @@ -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 -- 2.39.2