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 have a cron job to use rsync to sync the data on a windows samba share (that i mount using /etc/fstab on boot). My problem is that the transfer seems to take almost as long as the initial transfer did. I have a ton of files, so I guess it still has to inspect each one for changes, but should it be a little faster the second time around? I just used command like this:

rsync -aver ssh /mnt/winserver/d/www /path/to/disk/rsync-backup/

where /mnt/winserver is a mounted cifs share and /path/to/disk is my local disk space.

share|improve this question
3  
Why are you specifying -e ssh when both the source and destination are mounted on the local system? That doesn't make sense. –  Zoredache Apr 10 '12 at 20:24

1 Answer 1

up vote 7 down vote accepted

The thing to remember is that the delta algorithm is most useful when the rsync server is running on the remote system and the client is on the local system.

When decides it needs to transfer a large file because the stat() output is different (size, modify dates), then some rsync process will need to read the source and destination files. If you have the remote files mounted, then the process running on your local system will read the entire file in over the network. If you were connecting to a rsync daemon on the remote system, then the remote rsync process will read the files, and the algorithm will be employed to decide which blocks need to be updated, and only the differences will cross the network.

As for why it is slow, there could be many reasons. If your selection of files was basically a huge number of small files, then the amount of time you needed to transfer may be irrelevant, and you are waiting for stat() to complete.

If you are running SMB over a wan connection, you could be running into the standard SMB sucks over high-latency-links issue.

You might want to look at setting up an SSH server on your Windows box that can run rsync. It is no longer free, but I generally use CopSSH/cwRsync.

share|improve this answer
    
Thanks. I'd vote up if I was able yet. –  Lactose Apr 10 '12 at 20:37

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.