I am mounting a windows server on a linux box, and running a local rsync to backup the windows drive. These are the commands that I am running.

mount -t smbfs -o username=user,password=pass //123.123.123.123/d_backup /path/to/mount

/usr/bin/rsync -aqH --numeric-ids --progress --timeout=14400 --bwlimit=2560 --backup --    backup-dir=/path/to/backup/ --delete /path/to/mount/ --exclude="Exclude/Directory" --exclude="pagefile.sys" /path/to/full/ 

And this is the error that I see.

rsync: send_files failed to open "/path/to/mount/pagefile.sys": Text file busy (26)
rsync: send_files failed to open "/path/to/mount/Exclude/Directory/somefile.txt": Text file busy (26)

You can ignore the "Text file busy" error. The point is that I shouldn't be hitting this error since I have excluded the file.

Can anyone see anything obvious that I am missing here? And before anyone asks, the rsync works perfectly fine on other windows machines where I do not require excludes.

link|improve this question
feedback

2 Answers

up vote 2 down vote accepted

I think to write the exclude options like this:

--exclude="*/Exclude/Directory/*"

You are missing the wild card character *

link|improve this answer
Yep was missing some wildcards. /facepalm – Fred Dysart Nov 10 '10 at 15:10
feedback

Try reordering the options in your command so that the source and destination are at the very end, e.g.:

/usr/bin/rsync -aqH --numeric-ids --progress --timeout=14400 --bwlimit=2560 --backup --backup-dir=/path/to/backup/ --delete --exclude="Exclude/Directory" --exclude="pagefile.sys" /path/to/mount/ /path/to/full/
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.