aboutsummaryrefslogtreecommitdiff
path: root/zb-cleanup
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2014-10-25 11:32:07 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2014-10-25 11:32:07 +0200
commit22cc3842a0969899ce50b3686884248e2bdbe93c (patch)
tree9d995696db4dd6fc012358c9c0f6c82064b81861 /zb-cleanup
parent3ee8104210ce183379c04490cef00cca2fc1bddc (diff)
downloadzfs-backup-22cc3842a0969899ce50b3686884248e2bdbe93c.tar.gz
zfs-backup-22cc3842a0969899ce50b3686884248e2bdbe93c.tar.bz2
add some useful error messages
Diffstat (limited to 'zb-cleanup')
-rwxr-xr-xzb-cleanup4
1 files changed, 2 insertions, 2 deletions
diff --git a/zb-cleanup b/zb-cleanup
index b4cb63b..f0faeac 100755
--- a/zb-cleanup
+++ b/zb-cleanup
@@ -40,7 +40,7 @@ done |sort -n | while read l ; do
if [ "$curtime" -lt "$max_age" ] ; then
#too old
- zfs destroy "$snapname"
+ zfs destroy "$snapname" || echo "$0: zfs destroy $snapname failed" >&2
continue
fi
@@ -52,7 +52,7 @@ done |sort -n | while read l ; do
#if it's too dense, delete the closer snapshot
if [ $(( ($density*($curtime-$lasttime))/($timenow-$lasttime) )) -lt 100 ]
then
- zfs destroy "$snapname"
+ zfs destroy "$snapname" || echo "$0: zfs destroy $snapname failed" >&2
else
lasttime="$curtime"
fi