Contents

    Restoring JTL-Shop database backups

    Your task/initial situation

    You have created a backup for JTL Shop, for example before an update. Since an error has occurred, you now want to restore the backup.
    Important: Please read these instructions beforehand: Creating database backups.
    Important: If you need to import a backup that was created before an update (or attempted update), please note the following: With updates, it often happens that new tables are created. Of course, these did not exist at the time the backup was created and can therefore not be taken into account in the backup! In that case, the very first step before importing a backup is to delete all tables. This means that the database must be empty before the backup is imported. Please note: If the same database is also used by other software, for example WordPress, Piwik or others (i.e. no JTL-Shop plug-ins), their tables must of course not be deleted.

    Option 1: Backup is up to date

    Important note: A backup is not necessarily up to date just because it was created recently! Please also read the section “Backup is not up to date”! If the backup has been made according to the description under “Creating database backups”, you do not need to pay attention to anything else.
    1. Now proceed as described under Restoring a backup.

    Option 2: Backup is not up to date

    If the backup is not up to date, additional steps are necessary. A backup is considered out of date if:

    • changes have been made in the back end since the backup.
    • a synchronisation between JTL-Shop and JTL-Wawi has been carried out after the backup.
    • the maintenance mode was not active after the backup (i.e. when orders could have come in).

    Changes in the back end

    If you have made changes in the back end of JTL-Shop after the backup, proceed as follows:

    1. Make all changes that have been made since the time of the backup again after importing the backup.
    2. Depending on the changes made, check whether further individual measures are required. If you made changes to standard features of JTL-Shop, you are welcome to ask us for help via ticket in the JTL-Customer Centre. For additional features (e.g. plug-ins), please contact the respective developer.

    Synchronisation with JTL-Wawi after the backup

    Every change in JTL-Wawi and JTL-Shop that is relevant for the other system is automatically reconciled during synchronisation. Once this change has been transmitted, the respective system assumes that the other system knows of the change. If a backup is imported into JTL-Shop that is missing a change that was transmitted via synchronisation, neither JTL-Wawi nor JTL-Wawi can know this.

    Important note: The following steps are based on the assumption that JTL-Shop is still in maintenance mode. If this is not the case, please also note the section “Maintenance mode was not active after backup” before carrying out one of the following steps.
    1. All changes to the item master data that have been synchronised after the backup will no longer be available in JTL-Shop after the backup has been restored (the databases are asynchronous).

    It is therefore possible that items, categories, characteristics, etc. will no longer be up to date. There are two ways to remedy this:

    Option 1 (not recommended, usually only an option for recent backups): You know exactly what has been changed and is not up to date. Trigger the synchronisation again manually for these objects.

    Option 2 (recommended): Transfer the relevant data to JTL-Shop again using the complete synchronisation.

    You can, for example, determine that no categories are sent. This is useful when you know that no categories were changed since the backup but are not sure whether changes were made to items or stock levels. You could trigger a synchronisation for everything but categories or for items and nothing else.

    In most cases, a complete synchronisation will be more appropriate since it also covers data that has been deleted in JTL-Shop. If, for example, you deleted items after the backup was created, then these items will also be back in JTL-Shop again after the backup has been imported.

    If you know which items you deleted and the inactive items still exist in JTL-Wawi, you can reactivate the items. Afterwards, carry out a complete synchronisation and then deactivate the items again to delete them in JTL-Shop.

    If the deleted elements no longer exist in JTL-Wawi, it is not possible to delete or deactivate them again in JTL-Shop.

    In that case, you need to delete all item data in JTL-Shop before the complete synchronisation.

    Learn how to do this in the following description.

    1. Changes made to customer data and/or settings such as the payment and shipping status will no longer be available after the restoring the backup. Unfortunately, there is no automated solution. You need to manually update the data.

    Customer data: If you know which customer data has been changed, you can click on In allen Onlineshops aktualisieren (Update in all online shops) again in JTL-Wawi (see Updating data in online shops) or switch the customer groups back and forth in order to update them and possibly send credit again (see Increasing the online shop credit of a customer).

    Order data: If you know which orders have been changed, you can use the option Bestellung im Webshop aktualisieren (Update order in online shop).

    Important note: If you update customer or order data in the online shop again in this way, emails may also be sent to the customers again.

    Maintenance mode was not active after backup

    In this case, it is possible that there were new customer accounts and/or orders in JTL-Shop that still exist in JTL-Wawi but are no longer present in JTL-Shop. Unfortunately, it is not possible to send orders from JTL-Wawi back to JTL-Shop again.

    Take the following steps if JTL-Shop was no longer in maintenance mode after the backup:

    Important note: Without these steps, there will be problems with new orders!
    1. Put JTL-Shop into maintenance mode. Under no circumstances must customers become active in the online shop before the following steps have been carried out!

    Order IDs

    The order IDs of JTL-Shop are no longer up to date. In JTL-Wawi, check the most recent order from this online shop for its External sales order ID (the shop order ID) and compare it to the most current order ID in JTL-Shop under Orders. The missing IDs (i.e. the missing orders) in between must

    • either be added in the View menu under Standard views > Order process in the setting Order ID – start number
    • or increased in the database. For this, increase nNummer under nArt=1 in the table tnummern by the respective value.

    This ensures that the next order number assigned is consecutive to the last one in JTL-Wawi.

    Internal counters

    There are internal counters (database table keys) which are also not up to date and would create a conflict when transferring new orders/customer accounts to JTL-Wawi. It would also be possible for customer accounts of different customers to become mixed up.

    These internal counters are automatically updated during the synchronisation. This means that ff you have carried out all other necessary steps, the first synchronisation will increase these internal keys in JTL-Shop accordingly. It is therefore important that at least one synchronisation is carried out before you deactivate the maintenance mode and customers register and/or order.

    Please note: Should there be issues with orders that cannot be sent to JTL-Wawi under Onlineshop > Bestellungen (Online Shop > Orders), please read “Orders cannot be sent”.

    Restoring backups

    Important note on importing backups of older versions of JTL-Shop: If you import a backup of an older shop version, for example the backup of a 5.00 version after an update attempt to 5.01, the update files may still be in the update/migrations folder! This would be the case if the backup files were simply transmitted again. The folder should be emptied and only refilled with the original files from the 5.00 backup.

    Otherwise, after importing the older shop database, you will be prompted in the back end to carry out an update to the new database even though its is already the right version. If you carry out the migrations, you end up with a newer database version that does not match the shop files.

    As a rule, you should leave the import of backups to a system administrator or your hosting provider. Should you nevertheless (have to) import a backup yourself, we will briefly explain your options via phpMyAdmin here.

    We will not go into detail about phpMyAdmin itself in the description. When in doubt, consult an expert or access training materials available online.

    Important information: Due to server configuration and script runtimes, large databases can lead to problems when PHPMyAdmin is used, and the backup may not be restored correctly. Please contact your hosting provider to restore the backup in that case! With a database size of more than 200MB, unusable results are to be expected with this method.
    1. Open phpMyAdmin and in the Databases section, select the database for which you want to import a backup.
    2. Switch to the Import tab.
    3. When importing via phpMyAdmin, there is not too much to consider. Click on Browse and select the file to be imported from your local hard drive.
    Important note: The character encoding of the file must be the same as the one of the backup. By default, this setting is always set to UTF-8 in phpMyAdmin. This is also the correct setting.
    1. Keep the default selections for all other settings and click OK.

    Troubleshooting

    Orders cannot be sent

    Sometimes it can happen that orders are not correctly transferred after the backup has been imported and are stuck in JTL-Wawi under Onlineshop > Bestellungen (Online shop > Orders). The respective error message reads something like:

    1. Check whether the orders are old or new.

    Old orders: Orders with the same customers, line items and order IDs already exist in JTL-Wawi as sales orders.

    Solution before JTL-Wawi 1.3: Do not delete these orders under Onlineshop > Bestellungen (Online shop > Orders). This would also delete them in JTL-Shop.

    Deleting these twice-sent orders is only possible directly via the JTL-Wawi database. Please contact the JTL-Wawi Support team by opening a ticket.

    Solution as of JTL-Wawi 1.3: Select the affected orders and click on the Löschen nur in JTL-Wawi (Delete only in JTL-Wawi) button. The orders are now only removed from JTL-Wawi.

    New orders: These are orders with other customers, line items and the same or different order IDs.

    Do not delete these orders under Onlineshop > Bestellungen (Online shop > Orders). This would also delete them in JTL-Shop. Since they are not saved in JTL-Wawi, they would be gone completely.

    The correct transfer of these orders is only possible after direct intervention in the databases of JTL-Shop and JTL-Wawi. Please contact the JTL-Shop Support team by opening a ticket.

    Special requirements for JTL-Shop when a backup is imported into JTL-Wawi

    For various reasons it may be necessary to restore a backup of JTL-Wawi.

    Basically, there are two possible scenarios. Either the backup is up to date or not up to date.

    Backup is up to date

    Important note: A backup is not necessarily up to date just because it was created recently. It is important that none of the points listed under “Backup is not up to date” apply.

    If the backup is up to date, nothing further needs to be considered with regard to JTL-Shop.

    Backup is not up to date

    If the backup is not up to date, additional steps are necessary. In relation to JTL-Shop, a backup of JTL-Wawi is not considered up to date if JTL-Wawi has been synchronised with JTL-Shop after the backup was created.

    Please note the following:

    Orders: Orders are the most critical factor in that case. In JTL-Wawi, check the most recent order from this shop for its External sales order ID (the shop order ID) and compare it to the most current order ID under Orders in JTL-Shop. All orders that are missing in JTL-Wawi can be selected here via the check box and then pencilled in for the next synchronisation. This allows you to get the orders back into JTL-Wawi.

    Important note: Of course, the orders arrive back in JTL-Wawi unprocessed. Unfortunately, you have to manually check which of the orders actually still need to be processed in what way and which are in fact already complete. Also be aware that this could result in new emails being sent to customers.

    Item master data: If the backup is not up to date, this means that the item master data in JTL-Shop is newer than in JTL-Wawi. However, the data is also asynchronous and JTL-Wawi is in charge. This means that the old data (e.g. item stocks and prices) will overwrite the more current data as soon as it is transferred to the shop. There is only one thing you can do about it: update the data in JTL-Wawi again.