try: --exclude=.thumbnails/*** --exclude=tmp/*** On Dec 16, 2009, at 1:40 PM, Gary Montalbine wrote:
> > > Tony Abernethy wrote: >> Gary Montalbine wrote: >>> I am trying to backup my /home directory. A friend helped me with this >>> script: >>> >>> #!/bin/sh >>> #backup friday >>> #"Spinning up backup drive and mounting it .." >>> cd / >>> mount /mnt/hd2 >>> #"Starting backup procedures" >>> rsync -avx --exclude="/home/gary/.thumbnails/" >>> --exclude="/home/gary/tmp/" --delete --ignore-errors /home/gary >>> /mnt/hd2/2010 >>> umount /mnt/hd2 >>> #END >>> >>> It backs up /home OK. However it does not exclude .thumbnails or tmp. I >>> have read the manual and am confused on the use of --exclude. I am >>> strictly a user. I am using rsync supplied by ML2010. >>> >>> Help would be greatly appreciated. >>> >>> Thanks, >>> >>> Gary >> from man page >> --exclude=PATTERN exclude files matching PATTERN >> Seems like you are excluding /home/gary/home/gary/.thumbnails/ >> /home/gary/home/gary/tmp/ >> you probably want something like >> --exclude=/.thumbnails >> --exclude=/.tmp >> to match where /home/gary/ leaves off. > > I tried various combinations of what you said. However I could not get it to > exclude either file. > > With my low level of expertise I need a precise script. > > Thanks, Gary > -- > Please use reply-all for most replies to avoid omitting the mailing list. > To unsubscribe or change options: > https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html