FTP issue/ Bug?
Posted: Sat 13 Aug 2022 6:17 pm
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?
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?