Restore your iObeya data
  • 4 Minutes à lire
  • PDF

Restore your iObeya data

  • PDF

The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article

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 <backup_directory>.

  2. Copy he context file (ex: ROOT.xml or iobeya.xml depending on the name given when you installed iObeya) into the path_to_tomcat_directory/conf/Catalina/localhost directory.

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 <backup_directory>.

  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 <backup_directory>.

  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 <backup_directory>.

  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 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:

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:

    • liquibase.command.url: provide the url and port of your database server

    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.

Restore your database on MySQL

Warning:

If it already exists, the iObeya database is automatically deleted before you restore the backup you created.

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 <DATABASE_USERNAME> and <DATABASE_PASSWORD> by the values configured in the context file you restored.

    Liquibase is going to clean the iObeya database schema.

    java -jar iobeya-sql-changelog.jar --defaultsFile=mysql/liquibase.properties --username=<DATABASE_USERNAME> --password=<DATABASE_PASSWORD> dropall
  3. At the end of the process you should see the following message:

    Liquibase command 'dropAll' was executed successfully.
  4. Open a terminal window in the <backup_directory>.

  5. Run the following command:

    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 <DATABASE_NAME> placeholder in the following command:

    mysql -h localhost -u root -p <DATABASE_NAME> < iobeyadump.sql

    Example:

    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:

If it already exists, the iObeya database is automatically deleted before you restore the backup you created.

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 <DATABASE_USERNAME> and <DATABASE_PASSWORD> by the values configured in the context file you restored.

    Liquibase is going to clean the iObeya database schema.

    java -jar iobeya-sql-changelog.jar --defaultsFile=mariadb/liquibase.properties --username=<DATABASE_USERNAME> --password=<DATABASE_PASSWORD> dropall

    At the end of the process you should see the following message:

    Liquibase command 'dropAll' was executed successfully.
  3. Open a terminal window in the <backup_directory>.

  4. Run the following command:

    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 <DATABASE_NAME> placeholder in the following command:

    mysql -h localhost -u root -p <DATABASE_NAME> < iobeyadump.sql

    Example:

    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:

If it already exists, the iObeya database is automatically deleted before restoring the backup you created.

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 <DATABASE_USERNAME> and <DATABASE_PASSWORD> by the values configured in the context file you restored.

    Liquibase is going to clean the iObeya database schema.

    java -jar iobeya-sql-changelog.jar --defaultsFile=oracle/liquibase.properties --username=<DATABASE_USERNAME> --password=<DATABASE_PASSWORD> dropall

    At the end of the process you should see the following message:

    Liquibase command 'dropAll' was executed successfully.
  3. Open a terminal window in the <backup_directory>.

  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 <SYSTEM_PASSWORD> for the user SYSTEM:

    imp userid=system/<SYSTEM_PASSWORD> 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.


Cet article vous a-t-il été utile ?