def backup_close_statistics(end_time): """Close out the tracking of the backup statistics. Moved to run at this point so that only the clock of the system on which rdiff-backup is run is used (set by passing in time.time() from that system). Use at end of session. """ assert Globals.rbdir.conn is Globals.local_connection if Globals.print_statistics: statistics.print_active_stats(end_time) if Globals.file_statistics: statistics.FileStats.close() statistics.write_active_statfileobj(end_time)
def close(self): """Process the remaining elements in the cache""" while self.cache_indicies: self.shorten_cache() while self.dir_perms_list: dir_rp, perms = self.dir_perms_list.pop() dir_rp.chmod(perms) self.metawriter.close() metadata.ManagerObj.ConvertMetaToDiff() if Globals.print_statistics: statistics.print_active_stats() if Globals.file_statistics: statistics.FileStats.close() statistics.write_active_statfileobj()