Difference between revisions of "X-Cart:X-CloudBackup"
(→Managing the X-CloudBackup add-on module) |
(→Managing the X-CloudBackup add-on module) |
||
Line 108: | Line 108: | ||
− | # In Admin area, go to the <u>X-CloudBackup page</u> section (<u><u>Tools->X-CloudBackup page</u></u>). On this page you should connect X-CloudBackup with your Dropbox or Google Drive accounts.[[Image:Manage_cloud_backup.png |border]] | + | # In Admin area, go to the <u>X-CloudBackup page</u> section (<u><u>Tools->X-CloudBackup page</u></u>). On this page you should connect X-CloudBackup with your Dropbox or Google Drive accounts.<br/>[[Image:Manage_cloud_backup.png |border]] |
− | # On the tab "Last backup info" you can find information about the last backuping.[[Image:Manage_cloud_backup2.png |border]] | + | # On the tab "Last backup info" you can find information about the last backuping.<br/>[[Image:Manage_cloud_backup2.png |border]] |
− | # The list of the backup archive files is showing on the tab "Backup files" [[Image:Manage_cloud_backup3.png |border]] | + | # The list of the backup archive files is showing on the tab "Backup files".<br/>[[Image:Manage_cloud_backup3.png |border]] |
Revision as of 14:34, 2 July 2013
Contents
Overview
What X-CloudBackup add-on module does
X-CloudBackup module allows to protect your most valuable asset – your e-commerce data – with this easy-to-use module that allows you to schedule automatic and manual X-Cart backups that can be set to upload to Dropbox, Google Drive or any FTP server you specify. Configure regularly scheduled backups of your files, database or both and augment with manual backups to ensure none of your irreplaceable data is permanently lost.
Why use X-CloudBackup ?
Never worry again about losing your priceless X-Cart data with this convenient module that lets you set and forget regular backups that are automatically uploaded when and where you want. Ready to upgrade or make a change? Run a manual backup first “just in case” something goes wrong.
Key features
- One-click backup of your X-Cart data. With just one-click, you can back-up your X-Cart database, files or both—just configure your preferences and rest assured that your precious data will be safe.
- Automatic, regularly-scheduled backups.Schedule automatic back-ups as frequently as every day, or however often you like. Once you configure your settings, your data will automatically back up as scheduled – no chance of “forgetting” a vital backup and permanently losing irreplaceable data.
- Instant uploading to Dropbox, Google Drive or FTP server.Add an extra layer of protection by housing your back-up somewhere other than your primary server, so if something goes wrong with your server, your data will be safe. This module can automatically upload generated backups to Dropbox, Google Drive or any FTP server of your choice.
System requirements
To be able to successfully install and use the X-CloudBackup add-on module, you need to have an installed working copy of 4.1.X or later. Make sure that the version of the module is the same as the version of your installed copy of X-Cart.
Required
- PHP version >= 5.3.1 and extension PHP cURL
- One of these functions (exec, system, passthru) have to available
- crontab or other scheduling program
- zip and mysqldump program on your server
Installing the X-CloudBackup add-on module
To install the module:
- Obtain the X-CloudBackup add-on module distribution package by downloading it from the File Area section of your X-Cart Account. The distribution package you need is contained in the archive file X-CloudBackup-x.y.z.tgz where x, y and z stand for X-Cart version (These need to match the version of X-Cart on which your store is based).
- Copy the distribution package to the X-Cart root directory on your server or hosting account.
- If you use a Windows-based server, or a UNIX-based server without terminal access:
- a) Decompress the archive with the X-CloudBackup distribution package to a directory on your system using your favorite compression program (WinZIP or any other archiver with support for TAR files).
- b) Use an FTP client to upload all the files contained in the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
- If you use a UNIX-based server with terminal access:
- a) Use an FTP client to upload the archive with the distribution package to the X-Cart root directory on your server or your hosting account.
- b) Decompress the package using the following command:
tar -xzvf X-CloudBackup-x.y.z.tgz
- Important: Make sure you keep the directory structure while unpacking and uploading the distribution package, otherwise some necessary files can be overwritten!
- In a web browser, run the installation script httр://<YOUR_XCART_DOMAIN>/install-xbackup.php replacing the variable <YOUR_XCART_DOMAIN> with the actual domain name of your X-Cart based store.
- Enter the Auth code, accept the License Agreement and click the Next button.
- The installation script patches the files and activates the module. Click Next to continue the installation.Note: if you are using a custom skin, you will need to manually apply the patches to it. Otherwise, the module will not work in this skin. For more info, see How to patch a 3rd party skin after the installation of the X-CloudBackup module.
- The installation script generates a new system fingerprint. Click Next to complete the installation.
- Use the ADMINISTRATOR AREA link to log in to the Admin area.
Enabling the X-CloudBackup add-on module
After the X-CloudBackup add-on module installation has been completed, the module you have installed needs to be enabled in your store:
- In Admin area, go to the Modules section (Settings menu->Modules).
- Choose the X-CloudBackup module by selecting the respective check box on the left.
- Click the Apply changes button. This activates the module.
Configuring the X-CloudBackup add-on module
After the X-CloudBackup add-on module has been enabled in your store, you should check and adjust its configuration:
- In the Modules section (Settings menu->Modules), click the Configure link opposite the module name ('X-CloudBackup').
The module configuration page (titled by the name of the module) opens: - Adjust the settings on the module configuration page:
- Click the Apply changes button to save the changes.
Configuring Google Drive storage
- Create an API project in the Google APIs Console
- Select the Services tab in your API project, and enable the Drive API.
- Select the API Access tab in your API project, and click Create an OAuth 2.0 client ID.
- In the Branding Information section, provide a name for your application (e.g. "Backup for my store"), and click Next. Providing a product logo is optional.
- In the Client ID Settings section, do the following:
- Select Installed application for the Application type
- Select Other for the Installed application type.
- Click Create Client ID.
- In the API Access page, locate the section Client ID for installed applications and note or copy the two pieces of information: the Client ID and the Client Secret.
- You need to copy and paste Client ID and the Client Secret to X-CloudBackup settings page
Excluding files from backup archive
If you want to exclude some files from a backup archive, you have to fill field "Excluded files".
- folder_name/* - it is format to exclude folder with name "folder_name" and with all files in this folder from the backup archive.
- folder_name/file_name.txt - it is format to exclude specific file from the backup archive
Running cron_backup.php script
X-CloudBackup provides a script cron_backup.php, which must be executed from the command line. You can use this script to launch execution of periodic backup tasks, necessary for correct operation of the module.It is recommended to launch this script using your favorite scheduling program (for example | cron daemon in Unix/Linux systems) once per 5-10 minutes.
Recommended setup for running cron_backup.php script via crontab:
*/5 * * * * cd /path/to/your/xcart; /path/to/php -d safe_mode=Off cron_backup.php --key=c901d65fc15ff15d0ac0af967437d051
- */5 * * * * - to run script every 5 minutes
- cd /path/to/your/xcart - to change dir to x-cart folder on your server
- /path/to/php - path to PHP 5.3.1 CLI binary on your server
- -d safe_mode=Off - to execute cron_backup.php script
- --key=c901d65fc15ff15d0ac0af967437d051 - secure key defined in x-cart General Settings: Secure key for launching the cron.php script
Managing the X-CloudBackup add-on module
- In Admin area, go to the X-CloudBackup page section (Tools->X-CloudBackup page). On this page you should connect X-CloudBackup with your Dropbox or Google Drive accounts.
- On the tab "Last backup info" you can find information about the last backuping.
- The list of the backup archive files is showing on the tab "Backup files".