Manual backup¶
For technical reasons, the functions described in the chapter Backup can only be used up to a shop size that depends on the server. If using these functions leads to errors for you, backups must be created manually.
A complete backup of the data of your online shop includes all files and directories as well as the entire database of your shop. The backup should be performed regularly and archived on a failure-resistant storage medium, such as CD- or DVD-ROM. In the unlikely event of data loss on your server, you can then restore your most recent backup. Note that when fully restoring a backup, all newly received orders, new customers and changes to products will be lost.
Note
Put your shop into offline mode before the backup. This ensures that no changes are made during your backup.
Backing up the files and directories of your shop¶
You can download the files and directories of your shop directly from your web server. To do this you need an FTP program, such as the free FileZilla included in the installation package. Start your FTP program and connect to the FTP server. On your FTP server, change to the directory in which you installed your shop. Create a new directory on your computer and give this directory a meaningful name, such as Datensicherung_2012-08-01. Download all files from the shop directory on your FTP server into the newly created directory on your computer.
Please note that this process can take some time, depending on the size of your shop. Once all files and directories have been downloaded, you have backed up the files and directories required for your shop database. All product, customer and order data is located in the database of your shop.
Backing up the shop database¶
Many hosting providers offer the software phpMyAdmin for managing MySQL databases, which can usually be accessed via the provider's customer portal. With phpMyAdmin, the complete database can be backed up and restored again at a later time if needed.
Attention
Your MySQL database is very sensitive. Do not make any changes to the configuration of the shop system directly in the database. Improper use of the software can lead to irrevocable loss of important shop data!
You may be prompted by phpMyAdmin to enter a username and password. If you do not know your MySQL access data, you can view it in the customer portal of your provider or read it from the configuration files of the shop.
Attention
Under no circumstances change the MySQL password in the customer portal of your provider. The data is stored in the configuration files; if the password changes, the shop system can no longer access the database and your shop will no longer be displayed correctly.
In the configuration files
admin/includes/configure.php
and
includes/configure.php
you will find, in the lower section, a block that contains, among other things, the constants DB_SERVER_USERNAME and DB_SERVER_PASSWORD. These constants contain the access data required for phpMyAdmin. Also make a note of the value of the constant DB_DATABASE, which contains the name of the database being used.
Log in to phpMyAdmin with the data from the configuration files. Depending on the configuration of the software, the database for your shop is selected automatically, or it must be selected from a list based on the name from the configuration file. Select your shop database and click on Export. As a rule, no further settings need to be made at this point. Click on OK. Depending on the configuration of your browser, the export file is downloaded automatically, or you are prompted in a dialog window to specify the storage location of the generated file. The name of the export file contains the database name and, depending on the configuration, the current date. Move the database backup into the directory created for your backup in the previous step.
Additionally, save the newly created complete backup on a failure-resistant storage medium such as CD- or DVD-ROM.
Restoring a backup¶
Attention
When restoring a complete backup, all orders received since the backup, new customers and changes made are irrevocably lost!
Note
Before restoring a backup, activate the function Shop offline under Content > Shop online/offline.
If no changes have been made to the source files of your shop since the last backup, proceed directly to step 3. Changes include, among other things, individual customizations by the manufacturer or third parties as well as software updates.
- Start your FTP program and connect to your FTP server
- Change to the installation directory of your shop and create a new subfolder. Move all folders and files of your shop into this folder.
- Upload all files and directories from your backup into the shop directory, which is now empty (except for the new subfolder)
- Start the database administration of your hosting provider
- Activate the shop database and switch to the Import tab in phpMyAdmin
- Click on Browse and select the database backup on your computer
- If no changes were made to the configuration of the database export when exporting the database, click on OK to start the import of the database backup