From 703a2c2f87bf3cb79344b58752bb82e33e746b40 Mon Sep 17 00:00:00 2001 From: bescoto Date: Thu, 20 Mar 2003 18:52:48 +0000 Subject: Added --list-at-time option git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@308 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/restore.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rdiff-backup/rdiff_backup/restore.py') diff --git a/rdiff-backup/rdiff_backup/restore.py b/rdiff-backup/rdiff_backup/restore.py index d9d8e58..f35b83a 100644 --- a/rdiff-backup/rdiff_backup/restore.py +++ b/rdiff-backup/rdiff_backup/restore.py @@ -82,6 +82,16 @@ def ListChangedSince(mirror_rp, inc_rp, restore_to_time): print "%-7s %s" % (change, path_desc) +def ListAtTime(mirror_rp, inc_rp, time): + """List the files in archive at the given time""" + MirrorS = mirror_rp.conn.restore.MirrorStruct + MirrorS.set_mirror_and_rest_times(time) + MirrorS.initialize_rf_cache(mirror_rp, inc_rp) + + old_iter = MirrorS.get_mirror_rorp_iter(_rest_time, 1) + for rorp in old_iter: print rorp.get_indexpath() + + class MirrorStruct: """Hold functions to be run on the mirror side""" def set_mirror_and_rest_times(cls, restore_to_time): -- cgit v1.2.1