Is there a way to restore rdiff-backup generated backups but skipping subdirectories?
Suppose I have backed up /dir
, /dir/subA
and /dir/subB
and I'd like to restore only /dir
and /dir/subB
, skipping /dir/subA
. I tried rdiff-backup -r now --exclude /dir/subA /dir server::/dir
but the --exclude seems to be ignored, although it's being parsed.
Why do I want to do it this way? Well, I can't restore the whole /dir
at once as it's too big to be restored within 24 hours after which I lose my dial up connection. It also doesn't work the other way round, first restoring the sub directories and then the main directory as the sub directories are being restored again, too.
Assuming you'r specifying your paths correctly, that shouldn't be a problem. Are the local folder /dir and the remote /dir actually the same path? Sometimes you loose valuable information when you obfuscate your examples to much.
Anyway, the important issue is that the --exclude should cover the full path, on the destination you are restoring to. I'll try to illustrate using an example.
Of course, there is also the lazy way of simply doing an --exclude '**/subA', assuming there are no more subA below in the directory structure.
I know, it's lame, but I have to answer my own question again: The trick is to exclude the subdirectory with
--exclude **var/web1
. I still don't know why that one works, but if I find out I'll post the answer here. BTW, I got the answer off the Rdiff-backup mailing list: http://lists.gnu.org/archive/html/rdiff-backup-users/2010-02/msg00017.html