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?

1 Answer 1


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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .