diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-08-25 16:56:32 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-08-25 16:56:32 +0100 |
commit | b3a10a1fa23da3b79cc2c4199e19a8538483a492 (patch) | |
tree | feffde879ba013535bf75528ddd9c604ee8818a4 | |
parent | fee21be49009a572269599b7a313451087e09844 (diff) | |
download | seivot-b3a10a1fa23da3b79cc2c4199e19a8538483a492.tar.gz |
Run summain before each backup.
-rwxr-xr-x | seivot | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -408,11 +408,15 @@ class Seivot(cliapp.Application): else: amount = self.settings['initial-data'] self.generate_live_data(self.live_data, amount) + if self.settings['verify']: + self.summain(self.live_data, 'backup-0.summain') self.measure(prog.backup, 0, amount) for i in range(1, generations): self.generate_live_data(self.live_data, self.settings['incremental-data']) + if self.settings['verify']: + self.summain(self.live_data, 'backup-%d.summain' % i) self.measure(prog.backup, i, self.settings['incremental-data']) for i in range(generations): @@ -438,6 +442,17 @@ class Seivot(cliapp.Application): runcmd(['genbackupdata', where, '--create', str(size), '--file-size', str(self.settings['file-size'])]) + def summain(self, dirname, basename): + '''Remember state of dirname at this time. + + This runs the summain(1) utility against dirname and stores + the result in a file called basename in the temporary directory. + + ''' + + self.runcmd(['summain', '--relative', '--output', + os.path.join(self.tempdir, basename), dirname]) + def file_sizes(self, dirname): bytes = 0 for dirname, subdirs, basenames in os.walk(dirname): |