What is FTP passive mode, when and how to use it with BackWPup?

BackWPup gives you the option of connecting to your FTP server using passive mode. But what is passive mode and when should you use it?

An FTP connection is made up of two channels: the command channel and the data channel. In active mode, the client connects to the server to establish the command channel, but the server connects back to the client to establish the data channel. The issue is that if the client is behind a firewall, remote connections may be blocked. In such a case, passive mode can be useful.

Passive mode allows the client to establish both channels, so the firewall won't block the FTP connection. The problem in this case is that the server may also be behind some firewall. If so, passive mode may not be feasible.

How to Know Which Mode to Use

Generally the host your FTP server is on should tell you whether to use passive mode or not. If they don't say, you can usually default to active mode.
However, it may also take a bit of trial and error. If you try active mode and the connection fails, you can try enabling passive mode. The inverse is true as well: if you have passive mode enabled and it's not working, try disabling it.

How to Enable/Disable Passive Mode

When you select FTP as a destination for one of your backup jobs, there will be an option to enable passive mode. If you check that box, then passive mode will be enabled.

How to Know Passive Mode is Enabled in Your Debug Log

If passive mode is enabled, you'll see something like this in your debug log:

[...] FTP client command: PASV
[...] FTP server reply: Entering passive mode

If you start seeing errors soon after these lines, then you might want to disable passive mode.