
October 23rd, 2012, 01:34 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 2
Time spent in forums: 41 m 56 sec
Reputation Power: 0
|
|
|
I've spent several hours searching with Google for sites with examples on this topic, but could not find any answer that helped me on my way.. Maybe you could post a few useful links you're talking about?
I think I'm able to write a script that loops through every single line of the file list and restores the files one by one, but we're talking about maybe a thousand files. That may take quite some time I think.
The reason I want to do this, is because someone hacked one of our webservers and corrupted all index.php, main.php, index.htm and index.html files. I just want to restore these specific files in all directories and not restore the entire repository first.
One solution actually is to restore all files first, then use tar to get all files from the file list:
# rdiff-backup -r 1D remote.host.com::/remote/backup/path local_restore_path
# cp file-list.txt local_restore_path/
# cd local_restore_path/
# tar -cvf the_files.tar -I file-list.txt
# mv the_files.tar /path/to/restore/files/to/
# cd /path/to/restore/files/to
# tar -xvf the_files.tar
But I think this is a waste of time as well as a waste of disk space. Surely other sysadmins have needed to do something like this. I would be surprised to see that rdiff-backup would not provide a solution for this..
|