Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My question: Will any information about excluded files (in the example below, the contents of the private directories) be transferred between the rsync client and daemon? I am using Rsync to sync work related files to a company server and I would prefer to keep directories which are not work related invisible to the work server.

Example Case: Suppose I have the following file structure.

On the work computer:
/home/user/documents/work_dir_1
/home/user/pictures/work_dir_2

On the home computer:
/home/user/documents/work_dir_1
/home/user/documents/private_dir_1
/home/user/pictures/work_dir_2
/home/user/pictures/private_dir_2

The contents of the file 'filter_file':
+ /documents/
+ /pictures/
+ /documents/work_dir_1/***
+ /pictures/work_dir_2/***
- *

Suppose I use the following rsync command from home to sync files using the work server as the source:

rsync -avu -e ssh --delete --filter='merge filter_file' usr@work_server.net:~/ ~/

I tested this using a local example, and found that the work files were properly updated, and the contents of the private directories were not deleted, since they are excluded in the filter. The effect of the sync is what I want, I just want to ensure that no information about private files makes it to the company server.

Thank you!

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.