DirectAdmin backup to CloudVPS Objectstore with CURL

By | February 5, 2016

A new version of this script is released at:
Please use the new version for better compatibility with DirectAdmin backup.

We use the CloudVPS Objectstore to store data in a redundant (3 times) and cheap way, ideal for backups. One of the main disadvantages is that files on the Objectstore may not be larger than 5 GB in size. To workaround this we created a customized ftp_upload.php script (= bash script that handles the upload of backup files within DirectAdmin) that split files larger than 5 GB into smaller files of 4 GB each, which has the disadvantages that you cannot restore these backups through the DirectAdmin GUI any more. 99% of the DirectAdmin accounts are never larger than 5 GB so this is not a big issue.

DirectAdmin only supports FTP or SFTP to connect to your backup destination. CloudVPS has a FTP to Objectstore proxy so you can upload your backups through FTP to the Objectstore, great!. Since FTP data is not encrypted (SFTP is) and because the FTP to Objectstore has some issues from time to time we developed a new customized ftp_upload.php that uses CURL to upload the backup files to the Objectstore. Tests in production are succesful, but I have to admit we don’t use this script on all production systems yet.

DirectAdmin backup settings:
IP: (only used when using stock ftp_upload.php)
Username: <projectid>:<username>
Password: <your password>
Remote Path: <name of the folder in your destination>
Port: 21 (only used when using stock ftp_upload.php)
Secure FTP: <choose> (only used when using stock ftp_upload.php)

The file can be saved to:

The script:


*warning* We are not responsible for any kind of damage or incompatibilities you experience when using this article, test this on a test server first before using it in production. Always check the code of the patch file yourselves before implementing it. */warning*.

Leave a Reply

Your email address will not be published. Required fields are marked *