Backing up User Accounts FTP / S3? (Newbie)

GregW

Verified User
Joined
Aug 6, 2019
Messages
39
Location
Australia
I need to set my User Account Backups to go to a non-local (not the same VM/VPS) storage. So either FTP or AWS S3 has been suggested to me.

I enter the same details in the schedule where section but on submit schedule now, it gives the error message Failed to connect ... FTP information invalid.

So I try and use the same credentials using filezilla on my desktop PC and it connects fine.

How do I fix this so server to FTP will work?

Is AWS S3 a better option? What is the correct way to set that up?

I found this - https://github.com/powerkernel/directadmin-s3-backup, but it is very old so was not sure it was good to use.

Or do I have other options?

Cheers
 
Last edited:
I would say the problem is that CSF firewall do not allow connection to Passive FTP Ports of your Remote FTP server and you need to allow/whitelist those Ports in CSF firewall in /etc/csf/csf.conf file for "TCP_OUT" option there. And then restart CSF with such command:
Code:
csf -ra
If you do not know the range of Passive Ports of Remote FTP server, you can try running this command:

- for Debian/Ubuntu:
Code:
grep "UID=65534" /var/log/syslog | grep REAL_IP_of_REMOTE_FTP_SERVER | awk -F'DPT=' '{print $2}' | awk '{print $1}' | sort | uniq -c
- for RHEL based OSs:
Code:
grep "UID=65534" /var/log/messages | grep REAL_IP_of_REMOTE_FTP_SERVER | awk -F'DPT=' '{print $2}' | awk '{print $1}' | sort | uniq -c
 
FileZilla succeeding from your desktop only proves the credentials work from that machine/IP. DirectAdmin connects from the server's public IP and also needs the passive data connection.

Before changing CSF blindly, watch the remote FTP server log while clicking Run Now. If no login reaches it, check DNS/routing, outbound TCP 21 and any source-IP allowlist. If login succeeds but LIST/STOR stalls, the passive port range/firewall is the likely issue. A 530 response points more towards credentials, source-IP policy, or an FTP/FTPS mode mismatch. Also confirm the remote directory already exists and is writable.

DirectAdmin's current documentation says the only built-in remote destination is FTP, with FTPS available; S3 is not native. It also documents a manual ftp_upload.php test for seeing the real error. Use a small temporary file and do not paste credentials/output publicly:


I would first make FTPS work from the DA host, then run an actual restore test. A backup is only proven once restore succeeds.
 
Back
Top