LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync exclude list (https://www.linuxquestions.org/questions/linux-software-2/rsync-exclude-list-277731/)

steelhead79 01-14-2005 10:53 AM

rsync exclude list
 
I can not get rsync to actually exclude the directories in my --exclude-from=file. I have read the man pages and scoured this forum but have not been able to find something that works?

I have added each exclusion to it's own line in the format of -/directory/* to exclude that directory but it still ends up being backed up to my rsync server. While rsync is running I see that [receiver] add_exclude (-/directory/*, exclude) is shown as the command is run but this directory still shows up on the rsync server.

Any help would be greatly appreciated as I have no idea what I am doing wrong.

homey 01-14-2005 11:49 AM

I use the command: ls > list to create my exclude list. Then I edit it to add any subdirectories which I want excluded.
rsync -avz -e ssh --delete-after --exclude-from=list /home root@sony:/mnt/backup

Here's what the list may look like ...
Code:

backup
cdbuild/KNOPPIX
cdbuild/INSERT
cdbuild/base
cdbuild/images
distros
mudd
list
netlogon
fred
samba


steelhead79 01-14-2005 12:02 PM

So do you not put the - in front of the directories that you want to exclude? From the man pages I thought that this was necessary, but this may be the cause of my exclude list not working as I have been adding it in front of every directory that I am trying to exclude?

Thanks for the help.

homey 01-14-2005 12:10 PM

Nope, my list looks just like that.


All times are GMT -5. The time now is 04:02 PM.