[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] How to restore a specific list of files with rd

From: cao
Subject: Re: [rdiff-backup-users] How to restore a specific list of files with rdiff backup?
Date: Tue, 23 Oct 2012 12:17:29 -0400

> > 23.10.2012 16:28, William wrote:
> >
> >Hello,
> >
> >Is it possible to restore a specific list of files from an
> >rdiff-backup repository?
> >
> >I'd like to restore all index.php and index.html files from one day
> >ago to a temporary local dir, but don't know how to do it, if it's
> >even possible. Even better would be to provide rdiff-backup with a
> >list of files from a text file.
> >
> >See also my original question:
> >http://www.linuxquestions.org/questions/linux-server-73/how-to-restore-a-list-of-files-with-rdiff-backup-4175433573/
> >

> On Tue, Oct 23, 2012 at 05:47:03PM +0200, Miroslav Geisselreiter wrote:
> Hi William,
> 1. to find where extactly is file you want to restore (your backup
> is in directory /backup/server1/)
>     rdiff-backup -r 1D /backup/server1/  | grep index.php
>     result can be for example /www/index.php
> 2. now restore that file to temp directory
>     rdiff-backup -r 1D /backup/server1/www/index.php /restoredir/index.php
>     note: you have to specify also target file name
> I think now you can write simple script do find more files form text file.
> Miroslav Geisselreiter

I think Miroslav meant '--list-at-time':

  rdiff-backup --list-at-time 1D /path/to/backup | \
     egrep '(main\.php|index\.(php|html?))$' > restorelist

then restore individually. maybe something like:

  for foo in `cat restorelist`; do
    rdiff-backup -r 1D /path/to/backup/$foo $foo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]