diff --git a/dedupestore/archive.py b/dedupestore/archive.py index e5a231ed2..e0f348d72 100644 --- a/dedupestore/archive.py +++ b/dedupestore/archive.py @@ -28,7 +28,7 @@ class Archive(object): def load(self, 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) assert self.metadata['version'] == 1 diff --git a/dedupestore/archiver.py b/dedupestore/archiver.py index 515b37275..e8d96c50b 100644 --- a/dedupestore/archiver.py +++ b/dedupestore/archiver.py @@ -71,6 +71,12 @@ class Archiver(object): archive = Archive(store, crypto, args.archive.archive) cache = Cache(store, archive.crypto) 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 'Compressed size:', pretty_size(csize) print 'Unique data:', pretty_size(usize)