Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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 *

share|improve this answer
    
Yep was missing some wildcards. /facepalm –  Magic Hat Nov 10 '10 at 15:10

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/
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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