This section covers the InterWorx Control Panel backup system and how to restore backups of your SiteWorx accounts, both from the NodeWorx interface and the SiteWorx interface. From within NodeWorx you can restore full backups of multiple SiteWorx accounts. From within SiteWorx, you can only create a backup of that particular account, but you will be able to create partial and full backups.
If you prefer to use the web interface, follow the steps below:
The command line backup interface is less user-friendly, but you have a lot more options at your disposal. Using the command line interface is most useful when you want to automate (e.g., via CRON) the creation of SiteWorx account backups.
The command you will be running is, as the iworx user:
[iworx@test-box ~]$ /home/interworx/bin/backup.pexbackup.pex has several command line parameters:
|--domains domain list||Space-seperated list of SiteWorx account domains to backup. Simple regular expressions are also allowed here (see examples below).|
|--domains all||Backup ALL domains on the server.|
|--backup-options backup options||A space separated list of what should be included in this backup. Valid options are:|
|--structure-only||Indicates that a "structure-only" SiteWorx backup should be created. A "structure-only" backup contains only SiteWorx related data that isn't stored in user-accessible locations (for example, email users and passwords which are stored in the internal InterWorx database). Actual files, such as website files, actual emails, and database tables, are not included in "structure-only" backups. Because of this, "structure-only" backups are very small and are created very quickly. They are especially useful for SiteWorx accounts that have large amounts of data files, as a regular full backup could take a considerable amount of time and resources. In a "structure-only" backup, data files such as website, email, and database data are up to the user to backup on their own.|
|--web||DEPRECATED. Backup web data. This option is deprecated, and --backup-options web should be used instead. This option is here for backwards compatibility, and will be removed in a future release.|
|DEPRECATED. Backup mail data. This option is deprecated, and |
|--databases||DEPRECATED. Backup database data. This option is deprecated, and |
|--all||DEPRECATED. Backup all account data (includes all the above). This option is deprecated, and |
|--output-dir path||Alternate path to save backups to. If this option is omitted, the default path is each SiteWorx account's backups directory (/home/unixuser/domain.com/iworx-backup).|
|--tmp-dir path||The temporary directory where the backup will be created before it is moved to the final location. If this option is omitted, the default path is set in the iworx.ini, under the [iworx.dir][tmp] setting.|
|--file-path=path||DEPRECATED. Alternate path to save backups to. This option is deprecated, and --output-dir should be used instead. This is here for backwards compatibility, and will be removed in a future release.|
|--xfer-method method||Sets the transfer method type. Valid options are:|
If a transfer.ini file is not specified with the --xfer-ini option, the script will look in the default location for the transfer.ini file (/home/unixuser/var/domain.com/.backup.transfer.ini). If the default transfer.ini file is missing, the backup file will be stored in the default local location (/home/unixuser/domain.com/iworx-backup).
|--xfer-ini /path/to/xfer.ini||Full path of the transfer.ini file that will be used during the backup transfer process. Note: If this option is used with multiple SiteWorx accounts, all the backups will be transferred using this single transfer.ini file.|
|--ftp||DEPRECATED. Indicates the backup file should be transferred via FTP. This option is deprecated, and --xfer-method ftp should be used instead. This is here for backwards compatibility, and will be removed in a future release.|
|--transfer-ini=/path/to/xfer.ini||DEPRECATED. Indicates the path to transfer.ini file which contains information on where to transfer the backup files. This option is deprecated, and --xfer-method ftpshould be used instead. This is here for backwards compatibility, and will be removed in a future release.|
|--reseller-id reseller-id||Limits the list of possible backup domains to the domains belonging to the reseller-id. If --domains parameter is not set, but --reseller-id is set, all domains under the given reseller are backed up. If --domains parameter is also set, the list will only match domains belonging to the given reseller.|
|--compression 1-9||Set the compression level for the final backup file. This option is identical to the gzip compression parameter, where 1 is the "quickest" and 9 is the "slowest". If not set, it defaults to the gzip default compression level.|
|--quiet||Causes the script to run silently, and not print any text to the screen. Useful for cron jobs.|
|--email email||Email address to send backup results to.|
|--filename-format format-string||Sets the format of the final backup filename given the format-string provided. If this option is omitted, the default format used is set in the iworx.ini, under the [iworx.backup][filename_format] setting (default %D-%t-%b.%d.%Y-%H.%M.%S).|
In its simplest form, you can create a full backup of a single SiteWorx account and have it stored in the default location (/home/unixuser/domain.com/iworx-backup):
[iworx@test-box ~]$ /home/interworx/bin/backup.pex --domains domain1.comTo create full backups of a SiteWorx account and send a status email to email@example.com:
[iworx@test-box ~]$ /home/interworx/bin/backup.pex --domains domain1.com --email firstname.lastname@example.org
[iworx@test-box ~]$ /home/interworx/bin/backup.pex --domains domain1.com --web --databases
[iworx@test-box ~]$ /home/interworx/bin/backup.pex --domains domain1.com domain2.com
[iworx@test-box ~]$ /home/interworx/bin/backup.pex --domains domain1.com domain2.com --file-path /tmp
[iworx@test-box ~]$ /home/interworx/bin/backup.pex --domains domain1.com --ftp --transfer-ini /root/transfer.ini
The following is the proper format for the transfer.ini files used by the InterWorx backup system.
[scp] username="user" password="your password" hostname="hostname.domaine.tld" remotepath="~/yourbackupdir/" port="22"
Note that the text [scp] or [ftp] must be the first line in the file. The [scp] section is used for SCP/SSH remote transfers, and the [ftp] section is used for FTP remote transfers.
[ftp] username="user" password="your password" hostname="hostname.domaine.tld" remotepath="~/yourbackupdir/" port="21"
If you prefer to use the web interface, follow the steps below.
--forcethe import to overwrite the existing SiteWorx instance. Please refer to the import documentation for further details.