- 4 Minutes to read
- Print
- PDF
Restore your iObeya data
- 4 Minutes to read
- Print
- PDF
Prerequisites
Make sure your Tomcat server is stopped before starting the restore procedure.
Step 1: Restore your settings
Restore your context file
Go to the <backup_directory>.
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
Go to the <backup_directory>.
Copy the file log4j2.xml file into the directory defined in the configuration log4j2FilePath parameter.
Restore your add-ons configuration
Go to the <backup_directory>.
Extract the add-ons configuration archive into the directory defined in the configuration pluginsPropertiesDirectory parameter.
Step 2: Restore your assests
Go to the directory configured in the assetDirectory parameter.
Delete the content of that directory to clean before restoring the assets backup.
Go to the <backup_directory>.
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:
Open the liquibase directory.
Open the directory corresponding to your database server (e.g mariadb, mysql, oracle).
Edit the liquibase.properties file
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.
Open a terminal window in the the liquibase directory.
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
At the end of the process you should see the following message:
Liquibase command 'dropAll' was executed successfully.
Open a terminal window in the <backup_directory>.
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
When the import operation is over, restart Tomcat.
Connect to the platform administration interface, and navigate to SETTINGS/Jobs.
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.
Open a terminal window in the the liquibase directory.
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.
Open a terminal window in the <backup_directory>.
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
When the import operation is over, restart Tomcat.
Connect to the platform administration interface, and navigate to SETTINGS/Jobs.
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.
Open a terminal window in the the liquibase directory of the iObeya version you tried to install.
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.
Open a terminal window in the <backup_directory>.
Execute sqlplus with the SYSTEM user and in the prompt type the SYSTEM password of the database.
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
When the import operation is over, restart Tomcat.
Connect to the platform administration interface, and navigate to SETTINGS/Jobs.
Launch manually the job RebuildIndexTasks.