Restore behavior for 'current_mirror.*.snapshot ?'

Ben Escoto bescoto@stanford.edu
Sun, 28 Apr 2002 22:30:23 -0700


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

>>>>> "JP" == Jason Piterak <Jason>
>>>>> wrote the following on Wed, 24 Apr 2002 11:17:18 -0400

  JP> The problem I'm running into is that the current restore command
  JP> is good for admins or even power users, but most users just want
  JP> to be able to say: "I want a restore of these files or
  JP> directories as of this date ("2002-04-24T10:51:55-0400" or "-1
  JP> day" or "-1 week"), and I want it in this directory." 

Yes, I think you are right.  Perhaps then rdiff-backup needs a new
restoring syntax, for instance:

rdiff-backup -r 1D /backup/usr/local/foo /tmp/output
rdiff-backup -r "2002-04-24T10:51:55-0400" /backup/usr/local/foo /tmp/output

which would mean something like "Put the contents of
/backup/usr/local/foo as they were 1 day ago (or, in the second case,
as they were on April 24th, 10:52am) and put them in /tmp/output".

    I'm not sure if this is very intuitive, but right now I can't
think of a better syntax.  It would also solve the problem of how to
specify restoring the current state; something like:

rdiff-backup -r now /backup/usr/local/foo /tmp/output

(or instead of "now" any time after which no changes were recorded)
could be used to restore an arbitrary directory as it currently is.

  JP> Eventually, I'd like users to be able to access their restore
  JP> from a Web interface, (because I'm lazy, and don't want to do
  JP> it). This means the script will probably be in Perl (I know, but
  JP> we don't have anyone who knows Python)... Right now, I'm just
  JP> doing a proof-of-concept in Bash for some automated backup
  JP> routines.

Yes, a few others have suggested this, and Trevor Harman wanted to
work on a KDE-type front end.  But it would make things a lot easier
if rdiff-backup had a regular output format at least for operations
like --list-increments...

  JP>   s'ok... I'll just change my program logic so that it says: o
  JP> Look in the corresponding rdiff-backup-data directory:

  JP> - If the request is for a dir, look at the *.dir or *.missing
  JP> files in the dir above requested restore dir.
  JP> - If the request is for a file, look at the *.missing or
  JP> *.snapshot files in the corresponding filepath.

Well, what if a file went from being a regular file to a directory or
vice-versa?  Why not just choose the oldest increment file newer than
the specified time with the correct prefix (i.e. prefix equals
filename of file you want to restore)?

  JP>  If there's an rdiff file older and newer than the requested
  JP> date, then restore using rdiff-backup and the older file.  o If
  JP> there is no newer rdiff file, then copy the files from the
  JP> current archive.

You probably mean "rdiff-backup increment file" instead of "rdiff
file"?  It think it is right then, but I don't understand the part
about the file being "older and newer than the requested date".


--
Ben Escoto

--==_Exmh_-930664436P
Content-Type: application/pgp-signature

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

iD8DBQE8zNps+owuOvknOnURAu6jAJ922DGgS7UfEJqJfmuH+JONJe93BgCeOwvD
NtRSl8+efo06o9SeEalKbyw=
=RFXG
-----END PGP SIGNATURE-----

--==_Exmh_-930664436P--