mirror of https://github.com/borgbackup/borg.git
Info output improvements.
This commit is contained in:
parent
ad2ccff560
commit
f1f54b7713
|
@ -28,7 +28,7 @@ class Archive(object):
|
||||||
|
|
||||||
def load(self, id):
|
def load(self, id):
|
||||||
self.id = id
|
self.id = id
|
||||||
data, hash = self.crypto.decrypt(self.store.get(NS_ARCHIVE_METADATA, self.id))
|
data, self.hash = self.crypto.decrypt(self.store.get(NS_ARCHIVE_METADATA, self.id))
|
||||||
self.metadata = msgpack.unpackb(data)
|
self.metadata = msgpack.unpackb(data)
|
||||||
assert self.metadata['version'] == 1
|
assert self.metadata['version'] == 1
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,12 @@ class Archiver(object):
|
||||||
archive = Archive(store, crypto, args.archive.archive)
|
archive = Archive(store, crypto, args.archive.archive)
|
||||||
cache = Cache(store, archive.crypto)
|
cache = Cache(store, archive.crypto)
|
||||||
osize, csize, usize = archive.stats(cache)
|
osize, csize, usize = archive.stats(cache)
|
||||||
|
print 'Name:', archive.metadata['name']
|
||||||
|
print 'Hostname:', archive.metadata['hostname']
|
||||||
|
print 'Username:', archive.metadata['username']
|
||||||
|
print 'Time:', archive.metadata['time']
|
||||||
|
print 'Command line:', ' '.join(archive.metadata['cmdline'])
|
||||||
|
print 'Number of Files:', len(archive.items)
|
||||||
print 'Original size:', pretty_size(osize)
|
print 'Original size:', pretty_size(osize)
|
||||||
print 'Compressed size:', pretty_size(csize)
|
print 'Compressed size:', pretty_size(csize)
|
||||||
print 'Unique data:', pretty_size(usize)
|
print 'Unique data:', pretty_size(usize)
|
||||||
|
|
Loading…
Reference in New Issue