rsync : Read input from a file and sync accordingly
Posted
by
Dheeraj
on Server Fault
See other posts from Server Fault
or by Dheeraj
Published on 2012-03-19T08:27:50Z
Indexed on
2012/03/19
10:07 UTC
Read the original article
Hit count: 247
rsync
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.
© Server Fault or respective owner