Copying the same files everyday due to timestamp error

Advertisement

cogdellj
Joined:
Posts:
6
Location:
New York

Copying the same files everyday due to timestamp error

Version is 5.7.6 (build 5874)
Issue happened before upgrade to new version on November 1st.
Windows 2008 R2 standard
FTPS

I have a very simple script that synchronizes my local Inetpub to a remote inetpub. After November first I noticed that my log showed that I was copying the same files everyday. I went into the GUI and it is picking up those same files as changed everyday. The problem appears to be the timestamp on the remote server. The date the remote server is showing is not the same date as the files on the remote server.

For example I go to the remote server I look at one of the pdf files that it is trying to copy, its date is 8/31/2012 12:00 AM on the server. The same file in the gui says 8/30/2012. The image attached shows the file name, date, type and size from the remote server. The bottom of the image shows what the synchronization checklist shows which is incorrect. I have tried everything I found on this site dealing with timestamps nothing is working and its also only a subset of data.
  • issues.JPG (47.38 KB, Private file)
Description: Attached you can see the issue

Reply with quote

Advertisement

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

Re: Copying the same files everyday due to timestamp error

Please attach a full log file showing the problem (using the latest version of WinSCP).

Name one of the files with the problem. Explain what timestamp do you see, what timestamp do you expect, and why.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

cogdellj

Re: Copying the same files everyday due to timestamp error

I am getting you a session log now however if you look at the image it shows you the files modified date of the remote server is 8/31/2012 12:00 AM and your software to the far right is the remote server is showing the "changed" date as 8/30/2012 basically removing a whole day from the real modified date and not displaying hours or minutes.
Last edited by cogdellj on 2015-11-19 00:01; edited 1 time in total

Reply with quote

cogdellj
Joined:
Posts:
6
Location:
New York

Re: Copying the same files everyday due to timestamp error

Attached is the session log all the files in this log are 1 day less than what is showing on the remote server. It started November 1st so maybe it has to do with daylight savings time because the files should show 12:00 am of the next day if you take an hour away and remove the hours it puts them 1 day before, however it is not happening to all files in the folder just some.
Description: session log

Reply with quote

martin
Site Admin
martin avatar

Re: Copying the same files everyday due to timestamp error

Thanks for the log. I'd like to see the remote directory listing listing after the synchronization.

Can you repeat the test and enter the filesnotfound folder after the synchronization?

Reply with quote

Advertisement

cogdellj
Joined:
Posts:
6
Location:
New York

Re: Copying the same files everyday due to timestamp error

Log attached.
  • session.log (410.67 KB, Private file)
Description: Session file

Reply with quote

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

Re: Copying the same files everyday due to timestamp error

Thanks.

So what happens is:
- The local file has timestamp 2013-08-19 04:00:00 GMT
- The remote file has timestamp 2013-08-18 server time. The server does not provide time, just date.
- WinSCP considers the remote file old and uploads the local file.
- After the upload WinSCP asks the server to set the remote timestamp to 2013-08-19 04:00:00 GMT
- The server probably converts the GMT time to local time (as of the server) just before midnight the previous day (2013-08-18)
- So you end up where you started.

This all stems from from ancient directory listing used by the server that
1) does not provide time for old files
2) uses server's time instead of GMT.

Reply with quote

cogdellj

Re: Copying the same files everyday due to timestamp error

It is not clear how can I resolve this? should I drop the files from the remote side then synch again?

Reply with quote

martin
Site Admin
martin avatar

Re: Copying the same files everyday due to timestamp error

I do not have a solution.

Use a better FTP server. Or use WebDAV protocol to talk to the IIS.

Reply with quote

Advertisement

You can post new topics in this forum