Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
shspivey
New Contributor II

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.

SHS
SHS
1 Solution
hbac
Staff
Staff

Hi @shspivey,

 

Please refer to this article: https://community.fortinet.com/t5/FortiGate/Technical-Tip-Backup-of-configuration-file-from-CLI-usin...

 

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

 

Regards, 

View solution in original post

9 REPLIES 9
AEK
SuperUser
SuperUser

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?

AEK
AEK
shspivey
New Contributor II

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

SHS
SHS
Tumisho715

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

hbac
Staff
Staff

Hi @shspivey,

 

Please refer to this article: https://community.fortinet.com/t5/FortiGate/Technical-Tip-Backup-of-configuration-file-from-CLI-usin...

 

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

 

Regards, 

shspivey
New Contributor II

Thanks. I will test that now.

SHS
SHS
shspivey
New Contributor II

I got the sniffer running now and I can packets. What seems odd is the protocol is shown as TCP. I don't get any details on the packets. I am checking to see if I don't have the sniffer configured right. I am running 7.4.3.

 

 

fg40f_sniffer_20240715.png

SHS
SHS
shspivey
New Contributor II

I realize now I need to open the pcap file in a program to get the detail. I may have found the problem. I am getting an error on the file save portion.

SHS
SHS
shspivey
New Contributor II

It turns out the Synology needed a separate setting for the user root directory. That wasn't needed when connecting from FileZilla. When I connected I was directed to the default location for the user account. But when I connected from the FortiGate that default directory connection was not being established. I don't know if this is a Synology issue or FortiGate issue or if they share the problem. But for now I have this resolved.

SHS
SHS
AEK
SuperUser
SuperUser

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

AEK
AEK
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors