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 have a text file which contains the list of files and directories that I want to copy (one on a line). Now I want rsync to take this input from my text file and sync it to the destination that I provide.

I've tried playing around with "--include-from=FILE" and "--file-from=FILE" options of rsync but is is just not working

I also tried pre-fixing "+" on each line in my file but still it is not working.

I have tried coming with various filter PATTERNs as outlined in the rsync man page but it is not working.

Could someone provide me correct syntax for this use case. I've tried above things on Fedora 15, RHEL 6.2 and Ubuntu 10.04 and none worked. So i am definitely missing something.

Many thanks.

share|improve this question
    
What does rsync do when it "doesn't work"? It will probably help to give an extract from your list of files. The rest of the command you used may help too. –  Ladadadada Mar 19 '12 at 8:53
1  
The option is --files-from, not --file-from. Is that a typo in your question or in the command you tried to run? –  Ladadadada Mar 19 '12 at 8:58
    
The problem may be within your file; quote a path of it. –  brownian Mar 19 '12 at 9:22
    
I am having a hard time posting the information that I want in the "comments" section. i will get back to you shortly. I will post the file where i ma fetching the input and the command output. –  slayedbylucifer Mar 19 '12 at 10:15

1 Answer 1

Can use following with rsync -a option

"--include-from=FILE" and "--from-file=FILE"
share|improve this answer
    
I am having a hard time posting the information that I want in the "comments" section. i will get back to you shortly. –  slayedbylucifer Mar 19 '12 at 10:14

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.