aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2014-06-05 20:37:28 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2014-06-05 20:37:28 +0200
commitbe5802b1204f48d8bb67a86343a2cfe930f4c323 (patch)
treef1f4f12591f6d46a9352ece8891b13d7a5616c7a
parent42aaa74de17b2d22b7a36d1fb6a788277229a77d (diff)
downloadzfs-backup-be5802b1204f48d8bb67a86343a2cfe930f4c323.tar.gz
zfs-backup-be5802b1204f48d8bb67a86343a2cfe930f4c323.tar.bz2
zb-cleanup: density calculation fix
-rwxr-xr-xzb-cleanup4
1 files changed, 2 insertions, 2 deletions
diff --git a/zb-cleanup b/zb-cleanup
index e193fbf..5f7c07b 100755
--- a/zb-cleanup
+++ b/zb-cleanup
@@ -1,7 +1,7 @@
#!/bin/bash
if [[ -z "$1" || -z "$2" ]] ; then
- echo "usage: $0 <zfs_object> <density>" >&2
+ echo "usage: $0 <zfs_object> <density_percent>" >&2
exit 1
fi
@@ -30,7 +30,7 @@ done |sort -n | while read l ; do
fi
#if it's too dense, delete the closer snapshot
- if [ $(( $density*($curtime-$lasttime)/($timenow-$lasttime) )) -lt 1]
+ if [ $(( $density*($curtime-$lasttime)/($timenow-$lasttime) )) -lt 100 ]
then
zfs destroy "$snapname"
else