summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbyteback-snapshot6
1 files changed, 3 insertions, 3 deletions
diff --git a/byteback-snapshot b/byteback-snapshot
index 8ea6035..1960085 100755
--- a/byteback-snapshot
+++ b/byteback-snapshot
@@ -121,12 +121,12 @@ class BackupDirectory
# http://dustymabe.com/2013/09/22/btrfs-how-big-are-my-snapshots/
# but it's not currently in Debian/wheezy.
#
- def snapshot_size(time=snapshot_times.latest)
+ def snapshot_size(time=snapshot_times.last)
`du -s -b #{snapshot_path(time)}`.to_i
end
def average_snapshot_size(number=10)
- snapshot_times.sort[0..number].inject(0) { |time, total| snapshot_size(time) } / number
+ snapshot_times.sort[0..number].inject(0) { |total, time| snapshot_size(time) } / number
end
# Create a new snapshot of 'current'
@@ -163,7 +163,7 @@ opts = Trollop::options do
opt :snapshot, "Take a new snapshot"
- opt :prune, "Prune old backups",
+ opt :prune, "Prune old backups (by 'age' or 'importance')",
:type => :string
opt :list, "List backups (by 'age' or 'importance')",