--- title: "Restore your iObeya Data" slug: "iobeya-436-on-prem-restore-your-iobeya-data" updated: 2024-12-20T14:15:37Z published: 2025-01-15T14:54:56Z canonical: "help.iobeya.com/iobeya-436-on-prem-restore-your-iobeya-data" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.iobeya.com/llms.txt > Use this file to discover all available pages before exploring further. # Restore your iObeya Data ## Prerequisites Make sure your Tomcat server is stopped before starting the restore procedure. ## Step 1: Restore your settings ### Restore your context file 1. Go to the . 2. Copy the context file (ex: ROOT.xml depending on the name given when you installed iObeya) into the **path_to_tomcat_directory/conf/Catalina/localhost directory**. > [!NOTE] > Note: > > For the next steps, refer to the context file you restored for each mentioned parameter. ### Restore your Log4j2 configuration file 1. Go to the . 2. Copy the file **log4j2.xml** file into the directory defined in the configuration **log4j2FilePath** parameter. ### Restore your add-ons configuration 1. Go to the . 2. Extract the add-ons configuration archive into the directory defined in the configuration **pluginsPropertiesDirectory** parameter. ## Step 2: Restore your assests 1. Go to the directory configured in the **assetDirectory** parameter. 2. Delete the content of that directory to clean before restoring the assets backup. 3. Go to the . 4. Extract the assets archive into the directory defined in the configuration **assetDirectory** parameter. ## Step 3: Restore your database Starting with iObeya version 4.20, [Liquibase](https://docs.liquibase.com/) is used to version control the iObeya database schema. - Liquibase is an open-source database-independent library for tracking, managing, and applying database schema changes. - It provides a way to apply changes to the database in a consistent and trackable manner. ### About Liquibase directory structure In the iObeya packages you have downloaded, you find a Liquibase directory containing the following files and directories: - iobeya-sql-changelog.jar (the Liquibase changesets package containing all the changes to initialize the iObeya database) - **mysql** - mysql-connector-java.jar (the JDBC driver for MySQL) - liquibase.properties (Liquibase configuration file preconfigured for MySQL) - **mariadb** - mariadb-java-client.jar (the JDBC driver for MariaDB) - liquibase.properties (Liquibase configuration file preconfigured for MariaDB) - **oracle** - ojdbc8.jar (the JDBC driver for Oracle) - liquibase.properties (Liquibase configuration file preconfigured for Oracle) ### Configuring Liquibase You need to edit the preconfigured liquibase.properties file corresponding to your database server to provide the information that Liquibase needs to connect. > [!WARNING] > Warning: > > Even if it is possible, we strongly recommend that you do not include authentication information in your liquibase.properties file. > > You can use instead command-line arguments to provide sensitive credentials using environment variables for instance. From the root directory of the iObeya packages: 1. Open the **liquibase** directory. 2. Open the directory corresponding to your database server (e.g mariadb, mysql, oracle). 3. Edit the **liquibase.properties** file 4. Change the following parameters: > [!WARNING] > Warning: > > - By default, the installation procedure creates a database schema named iobeya. > - If you changed the database schema name during the installation process, you need to change this value in the url parameter defined in the **liquibase.properties** file. > - Check the value that was configured in the context file deployed on your running instance. - liquibase.command.url: provide the url and port of your database server ### Restore your database on MySQL > [!WARNING] > Warning: > > If it already exists, the iObeya database is automatically deleted before you restore the backup you created. > [!TIP] > Recommendation: > > We highly recommend restoring your backup on a pre-production environment to validate the procedure before you restore it on your production. 1. Open a terminal window in the the **liquibase** directory. 2. Run the following command after replacing and by the values configured in the context file you restored. Liquibase is going to clean the iObeya database schema. ```pgsql java -jar iobeya-sql-changelog.jar --defaultsFile=mysql/liquibase.properties --username= --password= dropall ``` 3. At the end of the process you should see the following message: ```java Liquibase command 'dropAll' was executed successfully. ``` 4. Open a terminal window in the . 5. Run the following command: > [!NOTE] > Note: > > During the iObeya installation procedure, a dedicated database named iobeya is created. > > If you changed the database name during the installation process, you need to replace accordingly placeholder in the following command: ```pgsql mysql -h localhost -u root -p < iobeyadump.sql ``` Example: ```sql mysql -h localhost -u root -p iobeya < iobeyadump.sql ``` 6. When the import operation is over, restart Tomcat. 7. Connect to the platform administration interface, and navigate to SETTINGS/Jobs. 8. Launch manually the job **RebuildIndexTasks**. ### Restore your database on MariaDB > [!WARNING] > Warning: > > If it already exists, the iObeya database is automatically deleted before you restore the backup you created. > [!TIP] > Recommendation: > > We highly recommend restoring your backup on a pre-production environment to validate the procedure before you restore it on your production. 1. Open a terminal window in the the **liquibase** directory. 2. Run the following command after replacing and by the values configured in the context file you restored. Liquibase is going to clean the iObeya database schema. ```sql java -jar iobeya-sql-changelog.jar --defaultsFile=mariadb/liquibase.properties --username= --password= dropall ``` At the end of the process you should see the following message: ```java Liquibase command 'dropAll' was executed successfully. ``` 3. Open a terminal window in the . 4. Run the following command: > [!NOTE] > Note: > > During the iObeya installation procedure, a dedicated database named iobeya is created. > > If you changed the database name during the installation process, you need to replace accordingly placeholder in the following command: ```pgsql mysql -h localhost -u root -p < iobeyadump.sql ``` Example: ```pgsql mysql -h localhost -u root -p iobeya < iobeyadump.sql ``` 5. When the import operation is over, restart Tomcat. 6. Connect to the platform administration interface, and navigate to SETTINGS/Jobs. 7. Launch manually the job **RebuildIndexTasks**. ### Restore your Oracle database > [!WARNING] > Warning: > > If it already exists, the iObeya database is automatically deleted before restoring the backup you created. > [!TIP] > Recommendation: > > We highly recommend restoring your backup on a pre-production environment to validate the procedure before you restore it on your production. 1. Open a terminal window in the the **liquibase** directory of the iObeya version you tried to install. 2. Run the following command after replacing and by the values configured in the context file you restored. Liquibase is going to clean the iObeya database schema. ```properties java -jar iobeya-sql-changelog.jar --defaultsFile=oracle/liquibase.properties --username= --password= dropall ``` At the end of the process you should see the following message: ```ruleslanguage Liquibase command 'dropAll' was executed successfully. ``` 3. Open a terminal window in the . 4. Execute sqlplus with the SYSTEM user and in the prompt type the SYSTEM password of the database. 5. On the sqlplus prompt, run the following command after replacing the for the user SYSTEM: ```pgsql imp userid=system/ file=export_iobeya_full.dump log=import_iobeya_full.log FROMUSER=IOBEYA TOUSER=IOBEYA ``` 6. When the import operation is over, restart Tomcat. 7. Connect to the platform administration interface, and navigate to SETTINGS/Jobs. 8. Launch manually the job **RebuildIndexTasks**.