Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I use rsync for a backup which pulls the files from a remote server. I use remote:/ as the source dir and specify the directories to backup with files-from:

rsync -ar --delete source-server:/ --files-from=dirlist --link-dest=../backup.previous backup.new

Now I want to exclude a few directories on remote and instead of managing the exclude list on the local machine I want to use the filter option to manage them with .rsync-filter files on the remote server by adding "-F":

rsync -ar --delete source-server:/ --files-from=dirlist -F --link-dest=../backup.previous backup.new

Now comes the problem: the exclude rules specified in .rsync-filter files do not work. If I do this for testing:

rsync -ar source-server:/some/dir -F localbackup

everything works as expected. So I guess there is some interference of the -F and the --files-from options which I could not resolve. Any ideas?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I don't think you can use -F and --files-from together since the intent of --files-from is to provide an exact specification of which files will be transferred.

As an alternative you can use a remote target to --files-from which I think will be better than having two places to define your backup. You can write --files-from=:/path/to/dirlist (note the colon) and the path specified will be looked up on the remote server instead of the local one. With this method you can keep both your includes and excludes in the same file on the remote server.

share|improve this answer
    
Thanks, that's a good hint. –  manol Feb 8 '11 at 23:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.