NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Checksum comparison for SmartSync


Joined: 12 Jan 2008
Posts: 12
Location: Orlando, FL
Reply with quote
My web server and my local computer are nearly always in different timezones, so the time check is very inaccurate. Only checking file sizes is not sufficient for those times where replacing code may result in a file with the same size, just different bytes. Simple process -

Check if same file name exists on local/remote locations.
If it does -

  • download remote file to temp location and do hash checksum calculation.
  • do hash checksum calculation on local file
  • if checksums are not same, perform appropriate action depending on whether you are syncing to remote server, or to local machine.


Pleeeeeeaaaaasse, implement this.
View user's profileFind all posts by spintzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
computer are nearly always in different timezones, so the time check is very inaccurate

to make it accurate you may want to use time service on both machines (ntpd in case of unix) and correct value in the Time Offset (see account settings).

Quote:
download remote file to temp location and do hash checksum calculation.
do hash checksum calculation on local file


This would make uploads/downloads working at turtle speed. Are you sure you need it?
Main reason why people are using smart-sync is performance. When date/time stamps and sizes for the files are matched you don't need to transfer it and it saves time. With your scenario transfer will happen for all the files...

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 12 Jan 2008
Posts: 12
Location: Orlando, FL
Reply with quote
dmitri wrote:
This would make uploads/downloads working at turtle speed. Are you sure you need it?
Main reason why people are using smart-sync is performance. When date/time stamps and sizes for the files are matched you don't need to transfer it and it saves time. With your scenario transfer will happen for all the files...


Maybe an option for it? A quick and full sync?
View user's profileFind all posts by spintzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I'd need an answer to the question why it would be needed?
Say, you have two files

localmachine\filea.php Nov11,2007, 11:30am, 11'222 bytes
remotemachine\filea.php Nov12,2007, 5:55pm, 11'255 bytes

why would smart sync have to compare their content?
Isn't it clear that they are different and it's also clear which one is newer?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 12 Jan 2008
Posts: 12
Location: Orlando, FL
Reply with quote
Multi-site, international development. One answer is for all developer machines to be set to the same timezone, but this is not always the case. If the timestamp was off by more than 1 hour, I'd want a Checksum comparison.
View user's profileFind all posts by spintzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
One answer is for all developer machines to be set to the same timezone

Good answer is to use correct "Time offset" in the account settings. It's what all developers (not servers!) should have in their settings.

Quote:
I'd want a Checksum comparison

this is not supported by FTP, WEBDAV or SFTP.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Checksum comparison for SmartSync
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic