We are currently still building up the English documentation; not all sections have been translated yet. Please note that there may still be German screenshots or links to German pages even on pages that have already been translated. This guide mostly addresses English speaking users in Germany.
Creating a database backup of JTL-Shop
Your task/initial situation
General information on the subject of JTL-Shop backups
The data that makes up your JTL-Shop comes from three sources:
To be fully protected against data loss, you therefore need to create backups for all three locations or have them created. Depending on the data, we recommend the following intervals:
Difference between regular and special backup
There are two different kinds of backup:
Regular backup: This is usually created automatically by the hosting provider at regular intervals (e.g. once every night) and kept for a certain period of time. In the event of unexpected data loss, it can be used for recovery.
Special backup: In some situations, it is advisable to create a separate backup, for example because you will be making critical changes. The simplest example is a version update.
With these special, separate backups, there are a few things you need to keep in mind to avoid errors, data loss or even “database asynchrony” afterwards.
JTL-Shop works together with JTL-Wawi. Both use independent databases (JTL-Wawi: MSSQL database, JTL-Shop: MySQL database), which are synchronised via the online shop synchronisation. Asynchrony is when the data in JTL-Wawi and JTL-Shop are not the same despite successful synchronisation.
Examples:
The origin of these errors can also be cache or general alignment issues. First you should check the browser cache, template cache and object cache in the back end of JTL-Shop under System > Cache.
However, such an asynchrony can also be created when an old database backup is imported.
Example:
Step 1: Preparations for the backup
Before you create a backup, you should make some preparations that will allow you to carry out the planned maintenance work or desired changes afterwards.
- Place JTL-Shop in maintenance mode in the back end under Settings > Global.
- From now on, do not carry out any more synchronisations with JTL-Wawi. If you use the background service JTL-Worker, stop it and deactivate it in JTL-Wawi under Admin > JTL-Worker.
- From now on, do not change any settings in the back end.
Step 2: Creating database backups of JTL-Shop
Database backups of JTL-Shop are also called SQL dumps. These contain the entire database of JTL-Shop, including all data stored there such as orders, customers, and settings for newsletter recipients. They do not contain any installation or configuration-specific data (e.g. database access credentials for connecting shop files to the database; Blowfish key for encrypting and decrypting customer data), templates, item images, etc. To save these, you must save the shop files from the root directory on the server.
In principle, you should always have database backups carried out by an expert. Ideally, this is done by your hosting/Internet provider, a server administrator specifically responsible for this, or a JTL service partner. They usually also know best how to automate the backup process and recognise at an early stage whether there could be problems.
Should you nevertheless create a backup yourself, the available options depend on the individual hosting provider. We therefore recommend that you check with your hosting provider first.
We will briefly explain the possible use of PHPMyAdmin, which is available almost everywhere, and then the use of Plesk, which is possible, for example, with a shop hosted by JTL.
Possibility 1: Backup using PHPMyAdmin
- Open PHPMyAdmin and in the Databases section, select the database for which you want to create a backup.
- Switch to the Export tab.
- Set the following settings in PHPMyAdmin for an export of the JTL-Shop database:
Your settings will then look like this:
- Click OK to create the database backup. You can then save it locally on your hard drive. Continue with step 3.
Possibility 2: Backup using Plesk
You can find more information about Plesk and how to access it as a JTL-Hosting customer under Managing email addresses and FTP access for JTL-Hosting for JTL-Shop.
- Log in to your Plesk account.
- Click on Databases > Export Dump.
- In the next step, you must specify the destination directory. We recommend the directory /httpdocs/export/backup (it is protected from direct access via .htaccess. You cannot download the backup with your browser, but you can access it via FTP and the Plesk file browser). You can also choose here whether the file should be downloaded immediately.
- Click OK to create the database backup and continue with step 3.
Step 3: Follow-up
- Carry out your necessary work (e.g. the update; go to help pages on Carrying out the update).
- Check whether your JTL-Shop has serious errors. The various integrated test methods in Troubleshooting > Diagnostics > File structure, the directory rights, and the database structure will help you here. In addition, we recommend that you take a close look at your online shop after the changes and check all important functions.
- If no errors occur, you may now carry out the online shop synchronisation again, reactivate the background service JTL-Worker if necessary and continue with your normal work. If errors occur, read the instructions Restoring a database backup.
- Deactivate the maintenance mode under Settings > Global.