• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

FTP backups - passive mode switch ignored

Johnwf

New Pleskian
Hi,

I am having a problem backing up from the cli to ftp using the following command:

Code:
pleskbackup --server -v --only-hosting -ftp-passive-mode -ftp-server=myftpserver.com -ftp-login=USERNAME -ftp-password=PASSWORD -ftp-path=plesk/

The backup starts however it errors out when it comes to copying the file to the ftp site with the following error:

425 Could not open data connection to port 59069: Connection timed out

Looking at the log i can see that FTP is not switching to passive mode so for whatever reason the '-ftp-passive-mode' is being ignored.

The help simply reports the switch usage as follows without any arguments

-ftp-passive-mode Specify the FTP server connection mode

If i backup from the plesk GUI with passive mode ticked it works fine and i can see quite clearly within the logs that passive mode is used so it is only the cli that is failing.

1952: Debug 15/05/2013 17:02:30.238 : * Connect data stream passively
1952: Debug 15/05/2013 17:02:30.238 : < 229 Extended Passive mode OK (|||2226|)


Can somebody please advise what the correct syntax should be?
 
http://download1.parallels.com/Ples...k-win-advanced-administration-guide/68614.htm



Maybe you need to open PASSIVE MODE range ports in the firewall. And that should most probably fix the issue.


Thanks but i don't believe it can be the firewall for two reasons, firstly it does not attempt to use passive mode as can be seen from the FTP log below, even if the firewall was miss-configured (which i am sure it is not as I have double checked there is a rule in place for the passive ports) I should still see it attempt to switch to the correct mode in the logs.

Code:
4524: Debug	15/05/2013 17:10:36.195 : < 220 This is a private system - No anonymous login
4524: Debug	15/05/2013 17:10:36.195 : > USER USERNAME
4524: Debug	15/05/2013 17:10:36.195 : < 331 User USERNAME OK. Password required
4524: Debug	15/05/2013 17:10:36.195 : > PASS PASSWORD
4524: Debug	15/05/2013 17:10:36.195 : < 230-OK. Current restricted directory is /
4524: Debug	15/05/2013 17:10:36.195 : < 230 203090 Kbytes used (0%) - authorized: 26214400 Kb
4524: Debug	15/05/2013 17:10:36.195 : > PWD
4524: Debug	15/05/2013 17:10:36.195 : < 257 "/" is your current location
4524: Debug	15/05/2013 17:10:36.195 : * Entry path is '/'
4524: Debug	15/05/2013 17:10:36.195 : > EPRT |2|2a03:4c8:4:2012::6d68:5622|59069|
4524: Debug	15/05/2013 17:10:36.195 : < 200 PORT command successful
4524: Debug	15/05/2013 17:10:36.195 : * Connect data stream actively
4524: Debug	15/05/2013 17:10:36.195 : > TYPE I
4524: Debug	15/05/2013 17:10:36.195 : < 200 TYPE is now 8-bit binary
4524: Debug	15/05/2013 17:10:36.195 : > STOR backup_1305151707.zip
4524: Debug	15/05/2013 17:10:36.195 : < 425 Could not open data connection to port 59069: Connection timed out
4524: Debug	15/05/2013 17:10:36.195 : * Failed FTP upload: 425
4524: Debug	15/05/2013 17:10:36.195 : * Remembering we are in dir "/"
4524: Debug	15/05/2013 17:10:36.195 : * Uploaded unaligned file size (0 out of 262536 bytes)
4524: Debug	15/05/2013 17:10:36.195 : * Connection #0 to host myftpserver.co.uk left intact
4524: Debug	15/05/2013 17:10:36.195 : * Upload failed (at start/before it took off)
4524: Debug	15/05/2013 17:10:36.195 : 
4524: Debug	15/05/2013 17:10:36.195 : Curl error (25) : Upload failed (at start/before it took off)

Secondly on exactly the same server if i backup through the plesk GUI the backup works, as you can see from the log below it executes the passive command to switch to the correct mode and the backup works, the firewall does not discriminate so if it was a firewall issue it would fail for the GUI as well.

Code:
1952: Debug	15/05/2013 17:02:30.238 : < 220 This is a private system - No anonymous login
1952: Debug	15/05/2013 17:02:30.238 : > USER USERNAME
1952: Debug	15/05/2013 17:02:30.238 : < 331 User USERNAME OK. Password required
1952: Debug	15/05/2013 17:02:30.238 : > PASS PASSWORD
1952: Debug	15/05/2013 17:02:30.238 : < 230-OK. Current restricted directory is /
1952: Debug	15/05/2013 17:02:30.238 : < 230 203058 Kbytes used (0%) - authorized: 26214400 Kb
1952: Debug	15/05/2013 17:02:30.238 : > PWD
1952: Debug	15/05/2013 17:02:30.238 : < 257 "/" is your current location
1952: Debug	15/05/2013 17:02:30.238 : * Entry path is '/'
1952: Debug	15/05/2013 17:02:30.238 : > CWD /plesk
1952: Debug	15/05/2013 17:02:30.238 : < 250 OK. Current directory is /plesk
[B]1952: Debug	15/05/2013 17:02:30.238 : > EPSV
1952: Debug	15/05/2013 17:02:30.238 : * Connect data stream passively
1952: Debug	15/05/2013 17:02:30.238 : < 229 Extended Passive mode OK (|||2226|)[/B]
1952: Debug	15/05/2013 17:02:30.238 : *   Trying 2a03:4c8:4:500::123... * connected
1952: Debug	15/05/2013 17:02:30.238 : * Connecting to 2a03:4c8:4:500::123 (2a03:4c8:4:500::123) port 2226
1952: Debug	15/05/2013 17:02:30.238 : > TYPE I
1952: Debug	15/05/2013 17:02:30.238 : < 200 TYPE is now 8-bit binary
1952: Debug	15/05/2013 17:02:30.238 : > STOR backup_1305151702.zip
1952: Debug	15/05/2013 17:02:30.238 : < 150 Accepted data connection
1952: Debug	15/05/2013 17:02:30.238 : * Remembering we are in dir "/plesk/"
1952: Debug	15/05/2013 17:02:30.238 : < 226-203090 Kbytes used (0%) - authorized: 26214400 Kb
1952: Debug	15/05/2013 17:02:30.238 : < 226-File successfully transferred
1952: Debug	15/05/2013 17:02:30.238 : < 226 0.087 seconds (measured here), 376.05 Kbytes per second
1952: Debug	15/05/2013 17:02:30.238 : * Connection #0 to host myftpserver.co.uk left intact

Unless i am missing something blindingly obvious it looks to me to either be a problem with my syntax or a bug in the 'pleskbackup' utility, does the GUI call that same utility and if so can you provide an example of the switch usage it executes?
 
http://download1.parallels.com/Ples...k-win-advanced-administration-guide/68614.htm



Maybe you need to open PASSIVE MODE range ports in the firewall. And that should most probably fix the issue.


Thanks but i don't believe it can be the firewall for two reasons, firstly it does not attempt to use passive mode as can be seen from the FTP log below, even if the firewall was miss-configured (which i am sure it is not as I have double checked there is a rule in place for the passive ports) I should still see it attempt to switch to the correct mode in the logs.

Code:
4524: Debug	15/05/2013 17:10:36.195 : < 220 This is a private system - No anonymous login
4524: Debug	15/05/2013 17:10:36.195 : > USER USERNAME
4524: Debug	15/05/2013 17:10:36.195 : < 331 User USERNAME OK. Password required
4524: Debug	15/05/2013 17:10:36.195 : > PASS PASSWORD
4524: Debug	15/05/2013 17:10:36.195 : < 230-OK. Current restricted directory is /
4524: Debug	15/05/2013 17:10:36.195 : < 230 203090 Kbytes used (0%) - authorized: 26214400 Kb
4524: Debug	15/05/2013 17:10:36.195 : > PWD
4524: Debug	15/05/2013 17:10:36.195 : < 257 "/" is your current location
4524: Debug	15/05/2013 17:10:36.195 : * Entry path is '/'
4524: Debug	15/05/2013 17:10:36.195 : > EPRT |2|2a03:4c8:4:2012::6d68:5622|59069|
4524: Debug	15/05/2013 17:10:36.195 : < 200 PORT command successful
4524: Debug	15/05/2013 17:10:36.195 : * Connect data stream actively
4524: Debug	15/05/2013 17:10:36.195 : > TYPE I
4524: Debug	15/05/2013 17:10:36.195 : < 200 TYPE is now 8-bit binary
4524: Debug	15/05/2013 17:10:36.195 : > STOR backup_1305151707.zip
4524: Debug	15/05/2013 17:10:36.195 : < 425 Could not open data connection to port 59069: Connection timed out
4524: Debug	15/05/2013 17:10:36.195 : * Failed FTP upload: 425
4524: Debug	15/05/2013 17:10:36.195 : * Remembering we are in dir "/"
4524: Debug	15/05/2013 17:10:36.195 : * Uploaded unaligned file size (0 out of 262536 bytes)
4524: Debug	15/05/2013 17:10:36.195 : * Connection #0 to host myftpserver.co.uk left intact
4524: Debug	15/05/2013 17:10:36.195 : * Upload failed (at start/before it took off)
4524: Debug	15/05/2013 17:10:36.195 : 
4524: Debug	15/05/2013 17:10:36.195 : Curl error (25) : Upload failed (at start/before it took off)

Secondly on exactly the same server if i backup through the plesk GUI the backup works, as you can see from the log below it executes the passive command to switch to the correct mode and the backup works, the firewall does not discriminate so if it was a firewall issue it would fail for the GUI as well.

Code:
1952: Debug	15/05/2013 17:02:30.238 : < 220 This is a private system - No anonymous login
1952: Debug	15/05/2013 17:02:30.238 : > USER USERNAME
1952: Debug	15/05/2013 17:02:30.238 : < 331 User USERNAME OK. Password required
1952: Debug	15/05/2013 17:02:30.238 : > PASS PASSWORD
1952: Debug	15/05/2013 17:02:30.238 : < 230-OK. Current restricted directory is /
1952: Debug	15/05/2013 17:02:30.238 : < 230 203058 Kbytes used (0%) - authorized: 26214400 Kb
1952: Debug	15/05/2013 17:02:30.238 : > PWD
1952: Debug	15/05/2013 17:02:30.238 : < 257 "/" is your current location
1952: Debug	15/05/2013 17:02:30.238 : * Entry path is '/'
1952: Debug	15/05/2013 17:02:30.238 : > CWD /plesk
1952: Debug	15/05/2013 17:02:30.238 : < 250 OK. Current directory is /plesk
[B]1952: Debug	15/05/2013 17:02:30.238 : > EPSV
1952: Debug	15/05/2013 17:02:30.238 : * Connect data stream passively
1952: Debug	15/05/2013 17:02:30.238 : < 229 Extended Passive mode OK (|||2226|)[/B]
1952: Debug	15/05/2013 17:02:30.238 : *   Trying 2a03:4c8:4:500::123... * connected
1952: Debug	15/05/2013 17:02:30.238 : * Connecting to 2a03:4c8:4:500::123 (2a03:4c8:4:500::123) port 2226
1952: Debug	15/05/2013 17:02:30.238 : > TYPE I
1952: Debug	15/05/2013 17:02:30.238 : < 200 TYPE is now 8-bit binary
1952: Debug	15/05/2013 17:02:30.238 : > STOR backup_1305151702.zip
1952: Debug	15/05/2013 17:02:30.238 : < 150 Accepted data connection
1952: Debug	15/05/2013 17:02:30.238 : * Remembering we are in dir "/plesk/"
1952: Debug	15/05/2013 17:02:30.238 : < 226-203090 Kbytes used (0%) - authorized: 26214400 Kb
1952: Debug	15/05/2013 17:02:30.238 : < 226-File successfully transferred
1952: Debug	15/05/2013 17:02:30.238 : < 226 0.087 seconds (measured here), 376.05 Kbytes per second
1952: Debug	15/05/2013 17:02:30.238 : * Connection #0 to host myftpserver.co.uk left intact

Unless i am missing something blindingly obvious it looks to me to either be a problem with my syntax or a bug in the 'pleskbackup' utility, does the GUI call that same utility and if so can you provide an example of the switch usage it executes?
 
Back
Top