Contents

    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

    Fall A – Datensicherung: Sie möchten für JTL-Wawi eine regelmäßige Datensicherung einrichten und erfahren, wie Sie ein Backup der Datenbank manuell und automatisiert erstellen können.
    Fall B – Backup zur Weitergabe an Dritte/andere Betriebsumgebungen erstellen: Sie möchten ein erstelltes Datenbank-Backup an Kollegen oder externe Dienstleister weitergeben. Lesen Sie hierzu: Datenbank-Backup wieder einspielen.

    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:

    • How often should I back up my data?

    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?

    • How do I back up my data?

    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.

    • Where do I store my backups?

    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.

    Hinweis: Testen Sie regelmäßig, ob Ihre Backups korrekt erstellt wurden. Spielen Sie dazu zum Beispiel ein erstelltes Backup wieder ein. Verwenden Sie hierzu eine Testinstanz von Microsoft SQL Server, die Sie zum Beispiel auf einem separaten Computer betreiben.
    • How many backups should I keep?

    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.

    • Creating backups before high-risk activities

    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.

    Hinweis: Eine vernetzte Systemlandschaft, die neben JTL-Wawi aus weiteren Systemen mit eigener Datenhaltung besteht, kann nur als vollständig gesichert gelten, wenn für jedes einzelne der Systeme eine Datensicherung vorliegt, die etwa zur selben Zeit erstellt wurde. Ausnahmen sind Systeme, die ausschließlich Daten aus einem führenden System einlesen.
    • How do I prepare backups for sharing?

    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.

    Achtung: Wenn Sie Daten an dritte Personen weitergeben, stellen Sie unbedingt sicher, dass diese Kopie der Daten nicht Ihren produktiven Betrieb beeinflusst! Dazu ist es notwendig, jegliche Konfiguration für Datenabgleiche aus Ihrem Datenbank-Backup zu entfernen. Lesen Sie hierzu: Datenbank-Backup wieder einspielen.

    Manually performing a JTL-Wawi backup

    1. Open the database administration of JTL-Wawi via Start > Database.
    2. Log in with your SQL server user data.
    1. Select the tenant for which you want to create the backup. In the Editing tenants section, click Database export.
    Please note: If you want to share the database backup with third parties or use it for any purpose other than backup-only, make sure to remove all synchronisation configurations. Read more on this topic here: Restoring a database backup.
    1. 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.

    1. Click Start. If a backup was successful, a database backup will have been created in the form of a .bak file.
    Hinweis: Beachten Sie: Sofern der Pfad des Backups geändert wird, muss das ausgewählte Verzeichnis über ausreichende Rechte verfügen. Sonst kann das Backup nicht erstellt werden. Das Verzeichnis “c:\programme\microsoft sql server\instanz\backup” ist das Standard Backup-Verzeichnis und hat in jedem Fall immer genügend Rechte.

    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.

    Für Nutzer der Express-Version von Microsoft SQL Server beschreibt folgender Workaround die automatische Datenbanksicherung (Hauptdatenbank und/oder Mandantendatenbanken) als geplanten Windowstask. Hierbei wird jeden Tag im Backupverzeichnis eine neue Backupdatei erstellt. Wird ohne zusätzliche Mandanten gearbeitet, lässt sich dies ebenfalls nutzen. Die Standarddatenbank heißt eazybusiness, d. h. im untenstehenden Code würden die jeweiligen Zeilen für die Mandanten fehlen.

    JTL-Wawi uses the following names for databases:

    • eazybusiness: Main database. This database contains all the information on tenants (the database administration stores data here) and on the first tenant (main tenant). This database is created automatically after installing JTL-Wawi.
    • tenant_x: Tenant databases. Every additional tenant has their own database. The main database “eazybusiness” notifies JTL-Wawi that additional tenants exist. The tenant databases named tenant_x are created automatically when a new tenant is added.

    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.

    Sind weniger Mandanten vorhanden, muss der Code ab sqlcmd entsprechend gekürzt werden.

    @echo off
    sqlcmd -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE eazybusiness TO DISK = 'd:\backup\db\%date%.bak'" 
    sqlcmd -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_1 TO DISK ='d:\backup\mandant_1\%date%.bak'"
    sqlcmd -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_2 TO DISK = 'd:\backup\mandant_2\%date%.bak'"
    sqlcmd -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_3 TO DISK = 'd:\backup\mandant_3\%date%.bak'"
    sqlcmd -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_4 TO DISK = 'd:\backup\mandant_4\%date%.bak'"
    sqlcmd -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_5 TO DISK = 'd:\backup\mandant_5\%date%.bak'"
    sqlcmd -S (local)\JTLWAWI -U sa -P sa04jT14 -Q "BACKUP DATABASE mandant_6 TO DISK = 'd:\backup\mandant_6\%date%.bak'"

    Achtung: Passen Sie den Pfad D:\Backup\eazybusiness\ für Ihr System an. In diesem Ordner werden die Backupdateien erstellt. Versuchen Sie vorher, eine manuelle Sicherung der Datenbank aus JTL-Wawi in den gewünschten Ordner durchzuführen. Wenn dies nicht gehen sollte und zu einem Fehler führt, dann lesen Sie diese Problemlösung: Backup lässt sich nicht erstellen. Wenn Sie das Datenbankpasswort geändert haben, verwenden Sie anstelle von sa04jT14 Ihr geändertes Passwort.

    @echo off
    sqlcmd -D eazy -U sa -P sa04jT14 -Q "BACKUP DATABASE eazybusiness TO DISK = 'd:\backup\db\%date%.bak'"
    Achtung: Passen Sie den Pfad d:\backup\eazybusiness\db\ für Ihr System an. In diesem Ordner werden die Backupdateien erstellt. Wenn Sie das Datenbankpasswort geändert haben, müssen Sie statt “sa04jT14” Ihr geändertes Passwort verwenden.

    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.