Deploy to FTP/SFTP Server not working

We use standard libraries for this. For FTP, we use the latest version of ftplib:

We encourage you to use SFTP instead. FTP was not designed to be a secure protocol, and has many security weaknesses.

Changing the protocol to sftp works for me. Thank you.

Still be good if when I load a project it remembered where I deployed it to when I last had it open so I could just continue with Refresh deploy rather than doing a full deploy.

I noticed when I do a ‘Full deploy’ now it is set to sftp that it removes all the contents of the directory on the server, not just the files in the manifest. eg All data files created by my users will be deleted.

Is this expected? Anyone else experience this?

Yes, this correct. It deletes the folder before uploading the new version.

Can I suggest a change to this procedure? It’s a bit of a hassle having to restore all the client data at a full deploy. Can it be changed to not delete all files or give the option to refresh deploy without the need to full deploy first? Currently I have set it back to ftp and not sftp. That way I full deploy then it fails then allows me to refresh deploy.

If we didn’t do a delete first on a full deploy, files could be left over from the previous deploy which are obsolete or incorrect.

You’re probably better off keeping your app and your client data separate (it seems like good housekeeping to do so in any case).

Will it delete subfolders? Maybe a checkbox in preferences whether it should delete old version or not?

Yes, it deletes everything.