Restoring Centreon MBI

Restoring data from the Centreon MBI Server

The restore process is divided into several steps:

  • Reinstalling the centreon-bi-server module in the same version as the one saved
  • Integrating generated reports
  • Integrating custom reports settings
  • Integrating Centreon MBI configuration data
  • Integrating MySQL data
  • Deleting data extracted from the backup
  • Reinstalling the backup.

Reinstalling centreon-bi-server module in the same version as the one saved

On the main Centreon server run the following command:

# yum install centreon-bi-server-x.y.z

Integrating generated reports

Take the latest centreon-bi-front-reports-and-custom-conf-aaaa-mm-jj.tar.gz backup and extract it to the /tmp directory:

# cd /tmp
# tar xzf centreon-bi-front-reports-and-custom-conf-YYYY-MM-DD.tar.gz

Then copy the backed up reports:

# /bin/cp -rf /tmp/var/lib/centreon/centreon-bi-server/archives/* /var/lib/centreon/centreon-bi-server/archives

Note

If the directory is different than expected, the user has changed the default settings. Just specify the right path.

Change the rights for the files:

# chown -R centreonBI:centreonBI /var/lib/centreon/centreon-bi-server/archives

Integrating custom report settings

Take the latest backup in the format centreon-bi-front-reports-and-custom-conf-aaaa-mm-jj.tar.gz and extract it to the /tmp directory:

# cd /tmp
# tar xzf centreon-bi-front-reports-and-custom-conf-YYYY-MM-DD.tar.gz

Then copy the saved settings:

# /bin/cp -rf /tmp/usr/share/centreon/www/modules/centreon-bi-server/configuration/generation/xsl/* /usr/share/centreon/www/modules/centreon-bi-server/configuration/generation/xsl
# /bin/cp -rf /tmp/var/lib/centreon/centreon-bi-server/reports/infos/* /var/lib/centreon/centreon-bi-server/reports/infos

Change the rights for the files:

# chown -R apache:apache /usr/share/centreon/www/modules/centreon-bi-server/configuration/generation/xsl

Integrating Centreon MBI configuration data

Import the SQL backup using the command:

# mysql -u root -p centreon_storage < /tmp/var/backup/dump_centreon_storage.sql

Deleting the data from the extracted backup

Delete the extracted data from the backup:

# cd /tmp
# rm -Rf /tmp/usr
# rm -Rf /tmp/var

Restoring Centreon MBI Reporting Server settings

The restore process is divided into several steps:

  • Reinstalling centreon-bi-reporting-server module in the same version as the one saved
  • Integrating the CBIS configuration
  • Integrating the custom reports designs
  • Restarting the CBIS engine
  • Deleting the data from the extracted backup
  • Reinstalling the backup.

Reinstalling the centreon-bi-reporting-server module in the same version as the one saved

On the main Centreon server run the following command:

# yum install centreon-bi-engine-x.y.z

Integrating the CBIS configuration

Take the latest centreon-bin-reports-and-conf-aaaa-mm-jj.tar.gz backup and extract it to /tmp directory:

# cd /tmp
# tar xzf centreon-bin-reports-and-conf-YYYY-MM-DD.tar.gz

Then copy the settings:

# /bin/cp -rf /tmp/etc/centreon-bi/* /etc/centreon-bi

Integrating the custom reports settings

Take the latest centreon-bin-reports-and-conf-aaaa-mm-jj.tar.gz backup and extract it to /tmp directory:

# cd /tmp
# tar xzf centreon-bin-reports-and-conf-YYYY-MM-DD.tar.gz

Then copy the report designs:

# /bin/cp -rf /tmp/usr/share/centreon-bi/reports/* /usr/share/centreon-bi/reports
# chown -R centreonBI:centreonBI /usr/share/centreon-bi/reports
# /bin/cp -rf /tmp/usr/share/centreon-bi/Resources/* /usr/share/centreon-bi/Resources
# chown -R centreonBI:centreonBI /usr/share/centreon-bi/Resources

Integrating MySQL data

Stop the MySQL service:

# systemctl stop mysql

Remove the directory /var/lib/mysql from the reporting server:

# rm -rf /var/lib/mysql

Extract the latest complete backup(created by default on Sunday):

# tar -xzf /var/backup/mysql-centreon_storage-bi-xxxx-xx-xx.tar.gz -C /

Extract all incremental backups created between the latest complete backup and the current date from the oldest to the most recent via the command:

# tar -xzf /var/backup/mysql-centreon_storage-bi-xxxx-xx-xx.tar.gz -C /

Change the rights on the directory /var/lib/mysql:

# chown -R mysql:root /var/lib/mysql

Start MySQL service:

# systemctl start mysql

Restarting the CBIS engine

Restart CBIS using the command:

# systemctl restart cbis
Stopping Centreon MBI scheduler : cbis
Waiting for cbis to exit .. done.
Starting Centreon MBI scheduler : cbis
Service started...

Delete the data from the extracted backup

Delete data extracted from the backup:

# cd /tmp
# rm -Rf /tmp/usr
# rm -Rf /tmp/var