FTP connects in windows cmd, but fails in duplicati

Hello all,

I’ve been trying to use duplicati to back up to a remote FTP server, running on a windows server 2019, and at this point I’m sure the server is fine. When I use cmd, everything works fine and I can add and remove files and folders freely, but when I try using the same address and credentials in Duplicati it tells me "Failed to connect: The remote server returned an error: 200 Type set to A. . "

Anyone know where I might have missed something? Tried this in both FTP and FTP (Alternative) and they both give back this error.

Welcome to the forum @mbaklor

Any detailed logging in whatever the remote FTP server is? Here’s an example from Filezilla Server:

(000004)10/23/2021 9:47:16 AM - (not logged in) (127.0.0.1)> Connected on port 21, sending welcome message...
(000004)10/23/2021 9:47:16 AM - (not logged in) (127.0.0.1)> 220-FileZilla Server 0.9.60 beta
(000004)10/23/2021 9:47:16 AM - (not logged in) (127.0.0.1)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000004)10/23/2021 9:47:16 AM - (not logged in) (127.0.0.1)> 220 Please visit https://filezilla-project.org/
(000004)10/23/2021 9:47:16 AM - (not logged in) (127.0.0.1)> USER duplicati
(000004)10/23/2021 9:47:16 AM - (not logged in) (127.0.0.1)> 331 Password required for duplicati
(000004)10/23/2021 9:47:16 AM - (not logged in) (127.0.0.1)> PASS ********
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 230 Logged on
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> OPTS utf8 on
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 202 UTF8 mode is always enabled. No need to send this command.
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> PWD
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 257 "/" is current directory.
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> CWD ftp_test_1
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 250 CWD successful. "/ftp_test_1" is current directory.
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> TYPE A
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 200 Type set to A
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> PASV
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 227 Entering Passive Mode (127,0,0,1,192,215)
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> LIST
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 150 Opening data channel for directory listing of "/ftp_test_1"
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 226 Successfully transferred "/ftp_test_1"
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> QUIT
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> 221 Goodbye
(000004)10/23/2021 9:47:16 AM - duplicati (127.0.0.1)> disconnected.

The odd thing is that 200 says success, so something about interaction with server confused the client.

The above log was from the Test connection button on Destination screen. Does that work for you?

When setting up that screen, make sure you put the right individual values into the right fields. Example:

You can also Export As Command-line, examine the URL for reasonableness (probably including use of forward slashes and not backslashes), then (assuming the destination folder is still empty), give URL to Duplicati.CommandLine.BackendTester.exe for a more thorough test than the simple Test connection.

If there are no logs and FTP is not using encryption (don’t do this over insecure network), communcation between client and server on port 21 is easy to observe with network monitoring tools such as Wireshark.