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
For backup.pex to run successfully, as root, you need to create and set up the transfer.ini file:
Create the file [[email protected] ~]$ touch /root/transfer.ini
Set ownership on the file [[email protected] ~]$ chown root:iworx /root/transfer.ini
Set permissions on the file [[email protected] ~]$ chmod 640 /root/transfer.ini
Open file in editor [[email protected] ~]$ nano /root/transfer.ini
and add the following contents to the empty transfer.ini file:
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).
Test whether your transfer.ini script works by running the following on one or two small domains:
[[email protected] ~]$ /home/interworx/bin/backup.pex --domains domain1.com domain2.com --email [email protected] --xfer-method ftp --xfer-ini /root/transfer.ini
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).