Sync by file size not working as expected

Advertisement

Sync by file size
Guest

Sync by file size not working as expected

Hi,

I have been using winscp to try and update some websites. Having attempted using the synchronize function, it would appear that there is an issue.

I use a Windows based host and a linux based server. On this I create and update html, javascript and image files. When I have made some changes locally, I have then gone to the server and synchronized the files by file size.

What I am hoping to happen is; all the file that have been updated by my systems (perhaps 1 character in a file changes) it would see as different on my server would be updated. While all those files that may have be recreated by my systems, but remain the same size (no changes at all) would not be updated. If I could get this to work it would save me hours of time unnecessarily using server and local resources.

I have come to the conclusion that the file sizes reported from the server do not get reported at bit level (if one char has changed it wont noticed it).

Can someone tell me if I am right, as I am a novice with linux. Also can someone tell me if there is a way I can do this? Is there a setting either on my server, on my local host or in winscp I can change?

Thanks

York (<invalid hyperlink removed by admin>)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: Sync by file size not working as expected

If you change one byte in the file, obviously the file size remains the same. There's no way around it.

Reply with quote

Guest

Re: Sync by file size not working as expected

martin wrote:

If you change one byte in the file, obviously the file size remains the same. There's no way around it.

Hey, how about implementing some checksum checking comparison criterion similar to rsync (-c, I believe) switch? It will make the synchronization far slower and probably will introduce some issues as to how checksums for specific locations could be cached as well as how to compute checksums, server-side to speed-up things (shell access must be enabled) but at least, people won't overwrite their files because of file time OS-dependent issues or mis-synch other files just because size isn't really changed and file time OS-dependent problem comes again into action (a particular type of files that suffer from this are sqlite databases!). Of course this particular mechanism may be implemented through specific software/scripts running on client and server-side but built-in support would be much appreciated I guess... I lost quite a few times thunderbird or firefox changed settings because of this problem affecting sqlite files...

Cheers,
Alex

Reply with quote

Advertisement

You can post new topics in this forum