Commandline syntax (WAS: RE: Restore behavior for 'current_mirror .*.snapshot ?' )

Ben Escoto
Sat, 11 May 2002 16:58:51 -0700

Content-Type: text/plain; charset=us-ascii

>>>>> "JP" == Jason Piterak <Jason>
>>>>> wrote the following on Mon, 29 Apr 2002 19:02:15 -0400

  JP> The result of a restore of 'now' or of a date after the current
  JP> backup is intuitive, and exactly what I would expect.

I forgot to mention in the previous message that the -r or
--restore-as-of command can also restore from the current mirror (and
'now' works too).

  JP>   There may even be some use for --include-* or --exclude-*
  JP> command line parameters in the context of a restore...
  JP> rdiff-backup -r 1M2W4D2H5m20S --include very_important_file-*
  JP> /home/foo /tmp/output

Yes, the --include*/--exclude* stuff works with restoring (or at least

  JP>    BTW: Would it make sense to start thinking of the commandline
  JP> syntax as being in different 'contexts'.
  JP>   ... Other commandline switches, like --no-compression might
  JP> fit into one or more contexts, but not others.

I think this is a good way to think about it (at least the code is
structured that way into a few main modes (backup, restore, list
increments, delete increments, test server)) but it may not be made
very clear in the documentation.

  JP>   Hmmm, good thought. I would assume that the user would want
  JP> the file/dir AS IT WAS as of the date requested, so I'll have to
  JP> look in both locations for files with the right prefix (though a
  JP> restore of the entire archive means restoring from the correct
  JP> rdiff-backup-data/'increments' file, not the directory name,
  JP> right?). As for which increment file to choose... You'd really
  JP> be looking for the first file OLDER than the restore date,
  JP> right?

It turned out to be a little more subtle than what first thought.  I
think the right way to do it is to get a list of all the increment
times, and then choose all the increments at least as new as the
newest increment time older than or as old as the selected time.  When
selecting an increment file to restore this issue doesn't come up, but
it does with the -r/--restore-as-of switch.

Ben Escoto

Content-Type: application/pgp-signature

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Exmh version 2.5 01/15/2001