Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

FTP issue/ Bug?

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
dale
Posts: 23
Joined: Tue 29 May 2012 9:15 pm
Weather Station: Ambient WS-5000
Operating System: Windows 11
Location: Glen Arbor, MI
Contact:

FTP issue/ Bug?

Post by dale »

I'm running version 3.19.3. I use FTP to upload the data to my website. For my website FTP does allow rename, but NOT if the target file exists. (In general this is true, I believe.) From looking at FTP logs in CumulusMX I observe:

1) if I tell CumulusMX to use FTP rename (without setting the delete before uploading flag), it always fails because CumulusMX attempts to rename without first deleting the target which exists.
2) If I tell CumulusMX to delete the target file before uploading, the file is deleted, then uploaded (and if use rename is enabled) it is renamed properly. If rename is NOT enabled, then the file is uploaded directly to the target filename.

I think that the interaction of these two flags is, perhaps, incorrect. It seems to me that if only the rename flag is enabled, the file should be uploaded to a temporary file, then the actual file should be deleted, then the rename should take place. I think this is the fastest way to safely replace the file. However, this is not possible currently. Instead CumulusMX deletes the target file (if that flag is set) and then uploads the temporary file and then renames the temporary file. This causes a longer time when the file is either missing or is only partially populated while the upload is taking place.

Am I missing something? Is there any FTP server that allows a rename when the target file already exists?
User avatar
mcrossley
Posts: 12685
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: FTP issue/ Bug?

Post by mcrossley »

Am I missing something? Is there any FTP server that allows a rename when the target file already exists?
My personal experience is that I have yet to have an FTP server that doesn't!

Originally I think these flags were seen as exclusive, you used one or the other.
However if they are both switched on then yes, it would be better to upload to a tmp file, delete the destination, then rename.

But only if only rename is enabled, then I believe the current process works for the majority of servers and incurs the smallest period where the data is unavailable.
dale
Posts: 23
Joined: Tue 29 May 2012 9:15 pm
Weather Station: Ambient WS-5000
Operating System: Windows 11
Location: Glen Arbor, MI
Contact:

Re: FTP issue/ Bug?

Post by dale »

If you could modify the behavior when both a switch on, that would be great! Thanks.
Post Reply