Skip to main content
shspivey
New Member
Jul 15, 2024 2:27 PM UTC
Solved

Automated Backup FTP Error

I am trying to set up automated backup over FTP on my FortiGate firewalls. I have the FTP server set up and running and have confirmed it is accessible through FileZilla. However when I enter the command through CLI I get an error message that I cannot decipher.

 

Here is my command: execute backup full-config ftp [filename] [ftp-server] [username] [pword]

 

And here is the error message I am receiving:

 

Connect to ftp server 10.10.10.100:21 ...
Please wait...
Send config file to ftp server via vdom root failed.
Command fail. Return code 5

 

I have searched but I cannot find anything specific to that error message. There are no entries in the log files on my FTP server, so it appears this error is directly related to the FortiGate.

Hong_FTNT
Hong_FTNTAnswer
Staff & Editor
Jul 15, 2024 3:29 PM UTC

Hi @shspivey,

 

Please refer to this article: https://community.fortinet.com/t5/FortiGate/Technical-Tip-Backup-of-configuration-file-from-CLI-using-FTP/ta-p/212891

 

You can collect packet captures to see if it is a connectivity issue. 

 

Regards, 

9 replies

AEK
SuperUser
SuperUser
Jul 15, 2024 2:44 PM UTC

If there no related logs on the FTP server this may mean that the FortiGate couldn't reach the FTP server. Can you ping the FTP server from the FortiGate?

Translate
AEK
shspivey
shspiveyAuthor
New Member
Jul 15, 2024 3:34 PM UTC

Yes, I should have put that in the comments. I can PING and TELNET from the FortiGate to the FTP server without any issues.

Translate
Tumisho715
New Member
Aug 31, 2024 7:25 PM UTC

Experiencing same issue, not sure if i understand your solution, mind explaining it well for me, sending from FG at site A to FTP server at site B reachable via IPsec , can reach FTP server from site A however getting this error 

 

Please wait...
Send config file to ftp server via vdom root failed.
Command fail. Return code 5

Translate
Hong_FTNT
Staff & Editor
Hong_FTNTAnswer
Staff & Editor
Jul 15, 2024 3:29 PM UTC

Hi @shspivey,

 

Please refer to this article: https://community.fortinet.com/t5/FortiGate/Technical-Tip-Backup-of-configuration-file-from-CLI-using-FTP/ta-p/212891

 

You can collect packet captures to see if it is a connectivity issue. 

 

Regards, 

Translate
shspivey
shspiveyAuthor
New Member
Jul 15, 2024 3:34 PM UTC

Thanks. I will test that now.

Translate
AEK
SuperUser
SuperUser
Jul 15, 2024 4:14 PM UTC

If your password contains special characters try put it between quotes in the exec backup command.

Translate
AEK
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024