Operational procedures¶
Backup and restore¶
In this section of the guide you will find the steps required to backup and restore iObeya.
If you would like to backup and restore iObeya, you must establish a backup strategy for the following elements:
- the assets.
- the configuration files.
- the database.
Backup¶
STEP 1. Prerequisites¶
- First, a backup directory must be created. For the next step, it will be named <backup_directory>.
- Stop Tomcat.
STEP 2. Backup your settings¶
Backup your context file¶
- Go to the installation directory of Tomcat.
- Go to the directory “<INSTALL_TOMCAT>/conf/Catalina/localhost”.
- Copy the iobeya.xml (by default) context file that contains the datasource settings and the iObeya configuration parameters into the <backup_directory>.
Note
For the next steps, refer to each mentioned parameter in the context file.
Backup your Log4j2 configuration file¶
- Go to the directory configured in the log4j2FilePath parameter.
- Copy the log4j2.xml (by default) file defined into the <backup_directory>.
Backup your add-ons configuration¶
- Go to the directory configured in the pluginsPropertiesDirectory parameter.
- Archive all the folders, subfolders, and files with a recursive ZIP or GZIP command.
- Copy the archive into the <backup_directory>.
STEP 3. Backup your assets¶
- Go to the directory configured in the assetDirectory parameter.
- Archive all the folders, subfolders and files with a recursive zip or gzip command.
- Copy the archive in the <backup_directory>.
STEP 4. Backup your database¶
Warning
You must have write permissions on the specified directory.
Backup your MySQL/MariaDB database¶
Open a terminal window.
Run the following command. At the prompt enter the password for the user root:
mysqldump -h <database_address> -u root -p --databases <database_name> > <backup_directory>/dumpfile.sql
Example:
mysqldump -h localhost -u root -p --databases iobeya > /var/iobeya/backup/iobeyadump.sql
Backup your Oracle database¶
Open a terminal window.
Run the following command, replace the <system_password> for the user SYSTEM:
exp userid=system/<system_password> file=/export_iobeya_full.dump log=/export_iobeya_full.log rows=y owner=IOBEYA
Restore¶
STEP 1. Prerequisites¶
Make sure that Tomcat server is stopped before starting the restore procedure.
STEP 2. Restore your settings¶
Restore your context file¶
- Go to the <backup_directory>.
- Copy the iobeya.xml (by default) context file to the “<INSTALL_TOMCAT>/conf/Catalina/localhost” directory.
Restore your Log4j2 configuration file¶
- Go to the <backup_directory>.
- Copy the file log4j2.xml (by default) file into the directory defined in the configuration parameter log4j2FilePath.
Restore your add-ons configuration¶
- Go to the <backup_directory>.
- Unzip the add-ons configuration archive into the directory defined in the configuration parameter pluginsPropertiesDirectory.
STEP 3. Restore your assets¶
Note
Please refer to the context file. If you defined assetStorage=database skip this step.
- Go to the <backup_directory>.
- Unzip the assets archive into the directory defined in the configuration parameter assetDirectory.
STEP 4. Restore your database¶
Restore your MySQL/MariaDB database¶
In your terminal window, log in with the database root user account.
Run the following command:
mysql -h localhost -u root -p database_name < <backup_directory>/dumpfile.sql
Example:
mysql -h localhost -u root -p iobeya < /var/iobeya/backup/iobeyadump.sql
Restart Tomcat.
Restore your Oracle database¶
Open a terminal window.
Create a new “iobeya” database and a dedicated “iobeya” user account:
Go into the “iobeya/dbscripts” directory of the installation package.
Execute sqlplus with the SYSTEM user and in the prompt type the SYSTEM password of the database.
On the sqlplus prompt, execute the reinit-iobeya.sql script using the @ followed by the complete path to the script file:
@<install>\dbscripts\reinit-iobeya.sql
On the sqlplus prompt, execute the init-iobeya.sql script using the @ followed by the complete path to the script file:
@<install>\dbscripts\init-iobeya.sql
Quit sqlplus.
Run the following command, replace the <system_password> for the user SYSTEM:
imp userid=system/<system_password> file=/PATH_TO_BACKUP_DIRECTORY/<backup_directory>/export_iob eya_full.dump log=/var/logs/import_iobeya_full.log FROMUSER=IOBEYA TOUSER=IOBEYA
Restart the iObeya server.
Go in the Administration interface, SETTINGS/Jobs
Launch manually the job “RebuildIndexTasks”
Advanced procedures¶
This section includes detailed procedures for different tasks, such as how to reset the database, launch jobs without using iObeya, etc.
Resetting the database¶
MySQL/MariaDB procedure¶
To reset the database, run the reinit-iobeya.sql srcipt.
Open a terminal window.
Go into the dbscript directory of the iObeya installation package directory.
Execute the reinit-iobeya.sql script using:
mysql -h localhost -u root -p < reinit-iobeya.sql
Oracle procedure¶
To reset the base, run the reinit-iobeya.sql script.
Open a terminal window.
Go into the dbscript directory of the iObeya installation package directory.
Execute sqlplus with the SYSTEM user and type in the prompt of the SYSTEM password in the database.
On the sqlplus prompt, execute the reinit-iobeya.sql script using the @ symbol, followed by the complete path to the script file:
@<install>\dbscript\reinit-iobeya.sql
Warning
All users and databases created by init-iobeya will be deleted.