you can see in the image that the two backups are totally different.
the before was done with the old script.
the after with the new.
Intuitively something is missing from the after
res, err = ftp.put({
host = host,
user = user,
password = pass,
secure = true, -- without this: FTP upload error: 530 Non-anonymous sessions must use encryption.
datasecure = true, -- without this: FTP upload error: 522 Data connections must be encrypted.
type = "a", -- no luck with type = "a" or type = "i"
argument = path,
source = ltn12.source.string(data)
})
if not res then
alert('FTP upload error: %s', tostring(err))
end
The guy who manages the FTP server didn't give me much information but it seems that by putting require_ssl_reuse=NO in the vsftpd.conf configuration file and maybe some firewall tweaks, the backup file is entirely transferred but always with this error: 426 Failure reading network stream.
Now if I try to send a 2 MB .csv file with this code, I always get a file truncated to multiples of 8192 and I need advice on how to correctly send a file via FTPS.
Ignoring the 426 error for now,
with require_ssl_reuse=NO inserted in the server configuration file vsftpd.conf the backup file is transferred entirely.
Now I need to send some 2 MB .csv files (or even a compressed ones) with the above code but I always get corrupted files as they are truncated to multiples of 8192 and I don't understand why.
No problem with smaller files