Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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
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


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.