projects
/
cumulus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bd1ee8e
)
cumulus-util: In list-snapshot-sizes output, display backup intent values.
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Thu, 6 Nov 2008 18:47:18 +0000
(10:47 -0800)
committer
Michael Vrable
<mvrable@turin.ucsd.edu>
Thu, 6 Nov 2008 18:47:18 +0000
(10:47 -0800)
cumulus-util
patch
|
blob
|
history
diff --git
a/cumulus-util
b/cumulus-util
index
f5d5fa3
..
05043f1
100755
(executable)
--- a/
cumulus-util
+++ b/
cumulus-util
@@
-83,6
+83,12
@@
def cmd_list_snapshot_sizes():
for s in sorted(lowlevel.list_snapshots()):
d = lbs.parse_full(store.load_snapshot(s))
check_version(d['Format'])
for s in sorted(lowlevel.list_snapshots()):
d = lbs.parse_full(store.load_snapshot(s))
check_version(d['Format'])
+
+ try:
+ intent = float(d['Backup-Intent'])
+ except:
+ intent = 1.0
+
segments = d['Segments'].split()
(size, added, removed) = (0, 0, 0)
for seg in segments:
segments = d['Segments'].split()
(size, added, removed) = (0, 0, 0)
for seg in segments:
@@
-93,7
+99,7
@@
def cmd_list_snapshot_sizes():
if seg not in segments:
removed += lowlevel.lowlevel_stat(seg + ".tar.gpg")['size']
previous = set(segments)
if seg not in segments:
removed += lowlevel.lowlevel_stat(seg + ".tar.gpg")['size']
previous = set(segments)
- print "%s
: %.3f +%.3f -%.3f" % (s
, size / 1024.0**2, added / 1024.0**2, removed / 1024.0**2)
+ print "%s
[%s]: %.3f +%.3f -%.3f" % (s, intent
, size / 1024.0**2, added / 1024.0**2, removed / 1024.0**2)
# Build checksum list for objects in the given segments, or all segments if
# none are specified.
# Build checksum list for objects in the given segments, or all segments if
# none are specified.