Exclude function On rsync command
Hello,
one of our server have backup drive on which do take monthly and weekly backups. We do use rsync command for it. Most of domains have bad folders and files which are particular. So we would like to know using "rsync" command how can I exclude multiple files and folders. Thank you its_joy |
Here's a great write up on rsync. The second link is the shortcut to the exclude patterns:
http://www.ss64.com/bash/rsync.html http://www.ss64.com/bash/rsync.html#exclude Peace, JimBass |
Hi JimBass,
Thanks for the great reply and that URL. We have some query which I am mentioning below. We want to exclude some directories in one command of rsync if this is possible than please let us know one example of it. Currently we drop the folders using sed command for e.g below. sed "/squid2/d" We do collect the files and folders by dropping the unwanted using sed and than we do rsync of remaining one. If there is any command for rsync which can exclude the multiple folders than let us know. Thank you its_joy |
I don't understand the problem. You can exclude 1000 things if you want, just either put all the exclusions in one massive string, or repeat the exclude command as many times as needed.
Peace, JimBass |
How about --exclude-from=FILE
That's stright from the manpage |
Thanks for update.
I just need the command which can exclude multiple directories. Suppose I want to rsync data of /home directory of one server to different server and I want to exclude some multiple directories which are present in many users home directory than what command should we use? Hope you got the problem now Its_joy |
All times are GMT -5. The time now is 11:44 AM. |