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

We've been migrating about 220 GB of data from a Windows 2003 Server to a Windows 2008 Server, and because of the time it would take to copy that data and the necessity of keeping it available for users, I came up with the idea of using rsync on an Ubuntu server to broker the migration. (I might have gone for a proper Windows solution - but the applications I found were a bit pricey for a one-shot like this - and permissions are not a problem).

All well and good - and today I'm making the last sync and confirming that the new server is up-to-date using diff, but I"ve noticed an odd thing with Excel spreadsheets (.xls).

Every instance of an Excel spreadsheet that has already been copied in a previous in a previous synchronisation is being marked as "already up-to-date" by rsync. However, when I then run a diff, I'm told that the files differ. I'm manually copying them, as there are but a handful, but I was wondering what might be causing this.

No other filetype in the entire 220 GB tree has had any problem like this - just the Excel/xls files. It'd be great if someone could come up with an explanation.

share|improve this question
2  
rsync, really? Was there something wrong with robocopy, which is built-in and actually can handle ACLs/Ownership? –  Zoredache Oct 20 '12 at 0:56
    
i was told by another windows person that robocopy wouldn't have done what I wanted... should have looked into it more closely –  HorusKol Oct 20 '12 at 6:12
    
It would. Probably even faster than rsync. –  the-wabbit Oct 20 '12 at 7:03

2 Answers 2

I agree with @Zoredache, Robocopy is all you need.

Try this from your 2008 server, to copy one directory to another; including security, attributes and time stamps...

ROBOCOPY /SEC \\source\share\folder \\destination\share\folder 

To copy everything as above, plus owner and audit information...

ROBOCOPY /COPYALL \\source\share\folder \\destination\share\folder

Further information...


If you wanted to continue using rsync, try the --checksum switch. According to the rsync man page, "Rsync finds files that need to be transferred using a "quick check" algorithm (by default) that looks for files that have changed in size or in last-modified time." Though I am not sure why rsync would not notice the time stamp changing on your files, it is entirely likely that the size of an Excel file would stay the same between edits.

share|improve this answer
    
while the robocopy stuff is nice - it doesn't answer the question I asked –  HorusKol Oct 20 '12 at 6:12
    
Nathan: add /DCOPY:T to fix directory timestamps too (otherwise they will be set to the current timestamp due to files being created in there). –  the-wabbit Oct 20 '12 at 8:21
    
@HorusKol it does - your file changes probably did not result in any change in file timestamp or size. –  the-wabbit Oct 20 '12 at 8:23
    
@syneticon-dj sorry, I should have been clearer - the user has provided an answer to my question, but the robocopy stuff is not relevant –  HorusKol Oct 21 '12 at 1:56
    
@syneticon-dj, I do not understand why you edited my post. Both the /sec and /copyall switches copy the time stamps. –  Nathan Hartley Oct 21 '12 at 7:33

rsync make use of timestamp. Maybe Excel doesn't set the last modification time ?

In that case, the better option would probably to use the "--checksum" flag in rsync. This way, all the files will be scanned. It won't mean that all the files will be transfered again and again, only changes will be transfered, but it means that all files must be scanned at each go.

They are also other options : "--ignore-times" and "--size-only" (I don't know the difference), but contrary to --checksum, the files will be skipped without checking their content first if the file size matches.

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.