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.
Video
Creating a database backup
In this video we explain how to back up your JTL-Wawi database.
Creating a data backup for JTL-Wawi
Your task/initial situation
Choosing a backup strategy
We recommend that you start thinking about a backup strategy early on. There are several layers to a backup strategy, and it can be more or less complex depending on the size of your business and order volume. Always ask yourself the following questions:
For a smaller company, one backup per day for the productive tenant of JTL-Wawi is sufficient. For example, one regular backup in the evening. The productive tenant holds the dataset of the productive operating environment in your company. In general, smaller companies only use one tenant. For larger businesses, shorter intervals might be a better option. A good way to determine the right interval is to ask yourself: How much data would I have to reconstruct if I restored the last backup?
You can perform backups manually or automatically. The possible automation options depend on your SQL server version and, if applicable, the additional software used. If you back up your data manually, you need to ensure that there is a designated employee who always performs the update, and another who can cover this role in their absence. We generally recommend automating the backup.
You should never store the backups on the same hard drive as the original database (which is the server). Ideally, the backups are stored on a different server at a different location than the database server. This helps to avoid the destruction of both the original and the backup database, for example in case of a fire.
If there is unlimited storage space, you can keep every backup. However, it is usually sufficient to keep only the last few backups. For example, the backups of the last two weeks. In addition, we recommend archiving a backup separately, e.g. once a month. This is useful if older data needs to be reconstructed.
There are activities that can pose a significant risk to the data integrity. These are all actions in which large amounts of data can be changed at once. These typically include:
Updating to a different version: During a version update, some of the data structures can be changed significantly for technical reasons. Before updating JTL-Wawi, you should always perform a data backup. With newer versions of JTL-Wawi, a backup is carried out automatically during the update process as long as you do not deactivate this option.
Adding new systems with data synchronisation: You should always carry out a data backup before activating a new system that writes data into your productive operating environment. Many systems do not only read large amounts of data from JTL-Wawi, but also send just as much data back to JTL-Wawi and thus significantly change the database. This group includes all data synchronisations with online shops, cash register systems, marketplaces, the JTL-Fulfillment Network, the JTL-Vouchers solution, the JTL-Customer Centre/Customer Account and all third-party systems connected via API that have a write access to JTL-Wawi.
Changing large amounts of data with JTL-DataTransfer: JTL-Wawi’s import/export tool is a powerful tool that can quickly change large amounts of data. However, if configured incorrectly, faulty changes are made on a large scale. You should always carry out a data backup before each import with JTL-DataTransfer, especially if you are not very familiar with the tool yet.
With the usual data backup, the current data status is backed up and set aside for emergencies. If an emergency occurs and you decide to restore your data from a data backup, the database backup will be restored in the productive operating environment. Another purpose of a backup is to pass it to third parties. For example to reproduce errors in support cases, to prepare updates in a staging environment or as a template of true to original data as part of a development project, e.g. a new online presence or setting up JTL-WMS.
Manually performing a JTL-Wawi backup
- Open the database administration of JTL-Wawi via Start > Database.
- Log in with your SQL server user data.
- Select the tenant for which you want to create the backup. In the Editing tenants section, click Database export.
- Select a storage location for your backup and give it a name. If you do not choose a different storage path, the default directory will be used: “c:\programme\microsoft sql server\instanz\backup”.
Reorganise and create new indices before the backup: Here you can specify whether the database indices should be optimised before the backup. We recommend activating this option to prevent problems when restoringa backup.
- Click Start. If a backup was successful, a database backup will have been created in the form of a .bak file.
The backup can be restored at any time via the DB import option.
For further information on importing backups, please read:
Automatically backing up JTL-Wawi data
If you use at least a standard licence for Microsoft SQL Server, you can automate the backup in SQL Server Management Studio. The automatic backup is then executed on the server by the server agent. Read our SQL server tips.
For users of Microsoft SQL Server Express, there is a workaround for the automatic database backup (main database and/or tenant databases) in the form of a scheduled Windows task. This comprises the daily creation of a new backup file in the backup directory. This is also possible without using additional tenants. The default database is called “eazybusiness”. This means that in the code below, the respective lines for the tenants would be missing.
JTL-Wawi uses the following names for databases:
Please note that a backup of the main database can only be imported by JTL-Wawi as a main database.
.bat file:
The respective backup folders must be created beforehand, e.g. d:\backup\eazybusiness\tenant_1, etc.
tenant_1 to 6 are only examples for tenant databases.
When there are fewer tenants, the code can be shortened after osql.exe to the actual number of existing tenants.
@echo off
osql.exe -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE eazybusiness TO DISK = 'd:\backup\db\%date%.bak'"
osql.exe -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_1 TO DISK ='d:\backup\mandant_1\%date%.bak'"
osql.exe -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_2 TO DISK = 'd:\backup\mandant_2\%date%.bak'"
osql.exe -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_3 TO DISK = 'd:\backup\mandant_3\%date%.bak'"
osql.exe -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_4 TO DISK = 'd:\backup\mandant_4\%date%.bak'"
osql.exe -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_5 TO DISK = 'd:\backup\mandant_5\%date%.bak'"
osql.exe -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_6 TO DISK = 'd:\backup\mandant_6\%date%.bak'"
Attention: Adjust the path D:\Backup\eazybusiness\ for your system. The backup files will be saved to this folder. Try performing a manual test backup of the JTL-Wawi database and saving it to the respective folder first. If this is not possible and an error message is generated, please read the troubleshooting page: Backup not possible. If you have changed the database password, use your changed password instead of “sa04jT14”.
@echo off
osql.exe -D eazy -U sa -P sa04jT14 -Q "BACKUP DATABASE eazybusiness TO DISK = 'd:\backup\db\%date%.bak'"
The tenant backup data can be restored via the Database administration.
Video
Creating a database backup
In this video we explain how to back up your JTL-Wawi database.
Related topics