Create Remote FTP Backup For Interworx Server

Create Remote FTP Backup For Interworx Server


Works for NodeWorx 3.0.3 running on CentOS 5.0
Reference URL: http://interworx.com/support/docs/iworx-cp/sysadmin/siteworx/backup-restore/howto-create-backup

Step 1:
For backup.pex to run successfully, as root, you need to create and set up the transfer.ini file:

Create the file [iworx@host ~]$ touch /root/transfer.ini
Set ownership on the file [iworx@host ~]$ chown root:iworx /root/transfer.ini
Set permissions on the file [iworx@host ~]$ chmod 640 /root/transfer.ini
Open file in editor [iworx@host ~]$ nano /root/transfer.ini

and add the following contents to the empty transfer.ini file:

[ftp]
username=“user”
password=“your password”
hostname=“hostname.domaine.tld”
remotepath="~/yourbackupdir/"
port=“21”

The bracketed [FTP] needs to be the first line of the file. I chose to locate transfer.ini in the /root directory (see command line below).

Step 2:

Test whether your transfer.ini script works by running the following on one or two small domains:
[iworx@test-box ~]$ /home/interworx/bin/backup.pex --domains domain1.com domain2.com --email your@email.com --xfer-method ftp --xfer-ini /root/transfer.ini

Step 3:

If you achieve success, you should receive an email confirming this. Now, go ahead and add the command above to your cron to execute automatically. You may add as many domains as you want in the command line above, separated by a space. You may also delete the --domains section altogether in the command line and backup.pex will back up all domains on the server.

Troubleshooting: The most common errors you may encounter will probably be related to syntax in either the transfer.ini file or the command line. If you get errors when backup.pex is running, they will show on your terminal window. Please see http://interworx.com/support/docs/iworx-cp/sysadmin/siteworx/backup-restore/howto-create-backup for additional parameters you may designate in the command line.

Notes: With respect to security, you need to decide if you want to do standard ftp port 21 transfers (unsecure) or scp port 22 transfers (secure).

Thanks a lot for this post! :slight_smile:

Remote FTP Backup

Hello,

Is it that easy to let WHM make a copy of weekly backups to the ftp space on the local network in the same datacenter ? that’s mean it should use different lan card than the public one such as eth0 or eth1, If so please advice with a little tips on how to do it without effecting the regular WHM backups in any way.
Regards.

Is it possible to select all domains at once?

Is it possible to select all domains at once?

yes after --domains just put “all”