6

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.

cdvonstinkpot
  • 61
  • 1
  • 3
  • Are you sure rsync is not available? That really is the tool you want. – Zoredache Feb 01 '12 at 03:05
  • Unfortunately no rsync, the only alternative available is webdav, which I presume won't be of use. – cdvonstinkpot Feb 01 '12 at 04: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
  • You might mount the remote ftp (curlftpfs) and local file systems booting on a Linux distro the local system, and write a fairly easy bash script that uses touch to set either locally or remotely the correct timestamp. – Marco Jun 11 '17 at 08:14

1 Answers1

4

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, https://winscp.net/eng/docs/task_synchronize_full#mode

Martin Prikryl
  • 7,327
  • 2
  • 36
  • 71
adam
  • 141
  • 6
  • Is there a Filezilla equivalent to the WinSCP functionality? – bg17aw Jan 20 '17 at 17:51
  • Not that I was aware of when I checked in version `3.7.3` but `3.24.0` was released a few days ago. Ask over in their forums https://forum.filezilla-project.org/ – adam Jan 22 '17 at 01:37