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 screwed up and downloaded ~10GB worth of files from my offsite backup location (ftp server) without checking the 'preserve timestamp' option in the client.

The PC with the local files is a netbook that uses a WiMax (4G cellular) connection for internet access, and the operation used up all my monthly bandwidth, plus $250 in additional bandwidth.

I'm having a problem with the app that updates the mirrored copy on the ftp server, in that it thinks everything's new now since all the files have the same timestamp, and appear to be newer than the copies on the server. It wants to upload everything all over again, which isn't an acceptable option.

Aside from downloading all ~10GB again, I'm seeking a way to transfer the timestamps from the ftp hosted files to their corresponding local file. Does anyone know a way to do that?

Another issue I'm concerned about is that some of the files that exist in both locations have changed, and if I change all the timestamps without considering this, I'm afraid some won't get mirrored later. In addition to changing all the timestamps, I'm going to need a way to compare the differences between the files in each location, and update the server's files according to a hash or something. Luckily, the ftp server does support hashing. I'm not aware of which client that can do what I need it to do to do that. Could someone also reccomend a client to do that?

Thanks in advance.

UPDATE:

I posted a similar message on the ftp client's forums, and got a reply advising me to restart the entire transfer all over again, and when the client asks what to do about files that already exist locally, to set it to 'resume' the file transfer.

The operation is currently doing its thing quite happily, and since now the client is set to preserve the timestamps, it's changing them all to the timestamp on the server like I need.

share|improve this question
    
Are you sure rsync is not available? That really is the tool you want. –  Zoredache Feb 1 '12 at 3:05
    
Unfortunately no rsync, the only alternative available is webdav, which I presume won't be of use. –  cdvonstinkpot Feb 1 '12 at 4:20
    
Did this end up working out? If so you can answer your own question to get this cleared from the 'unanswered' list. –  Nathan V Nov 28 '12 at 11:29

1 Answer 1

I just made the same mistake; downloaded many files without preserving timestamp. While the author found a solution, he does not state which FTP client he used.

The following solution will update timestamp for files (labeled as "date modified" in Microsoft Windows) available via FTP with FileZilla Client. I have not found a solution to synchronizing the folder timestamp.

Using FileZilla 3.7.3
1. Turn on preserve timestamp: Transfer > Preserve Timestamp ...
2. Turn on resume transfers: Transfer > Default file exists action...
3. and then, Downloads: Resume file transfer (or set Uploads if timestamp error is in the other direction)
4. Re-initiate the download. Existing, completed files will have their timestamp updated.

Note: FTP is a relatively simple protocol, so a recursive listing will be re-issued on each directory on the remote FTP server. This will take some time for a server with many files and directories.

If your server is SFTP, you can use WinSCP to synchronize timestamps.
1. Navigate to the proper directories
2. Commands > Sychronize
3. If you are connected to an SFTP server, you will see an option to Sychronize Timestamps under "mode"
See, http://winscp.net/eng/docs/task_synchronize_full#synchronization_mode

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.