Backup of Centreon MBI

Backup of Centreon MBI Server’s data on Centreon server

Saved items

The saved items are:

  • Saving custom report templates and their settings
  • Saving generated reports

How works the backup script

The backup script is executed on a daily basis with a cron job located in /etc/cron.d/centreon-bi-backup-web:

#
# Cron to backup Centreon MBI Engine frontend module
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin

# rewrite file with new cron line
CRONTAB_EXEC_USER=""

0 12 * * * root bash /usr/share/centreon-bi-backup/centreon-bi-backup-web.sh >> /var/log/centreon-bi/centreon-bi-backup-web.log 2>&1

By default, backups are located in /var/backup

To modify this folder, update the BACKUP_DIR value in the backup script (line 63) located here: /usr/share/centreon-bi-backup/centreon-bi-backup-web.sh

On a Centreon server, only generated reports and report templates need to be backuped. The backup format is centreon-bi-front-reports-and-custom-conf-aaaa-mm-jj.tar.gz

Backups periodicity

  • Backup periodicity: daily
  • Backups rotation : 8 days

To modify this value, update RETENTION_AGE in the backup script (line 67) located here: /usr/share/centreon-bi-backup/centreon-bi-backup-web.sh

Note

We advise to export backups to another resource in order to secure them.

Backup of a Centreon MBI dedicated server

Note

It is important to have at least 5 GB of free space on the Volum Group hosting the data storage MySQL/MariaDB DBMS. To control free space run the following command by entering the name of the Volum Group

# vgdisplay vg_data | grep -i free

Saved items

The saved items are:

  • Configuration files
  • Agregated data
  • Reports & Resources

How works the backup script on central server

The backup script is executed on a daily basis with a cron job located in /etc/cron.d/centreon-bi-backup-reporting-server:

#
# Cron to backup Centreon MBI Engine server
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin

# rewrite file with new cron line
CRONTAB_EXEC_USER=""

30 12 * * 0 root bash /usr/share/centreon-bi-backup/centreon-bi-backup-reporting-server.sh --total >> /var/log/centreon-bi/centreon-bi-backup-reporting-server-db.log 2>&1
30 12 * * 1-6 root bash /usr/share/centreon-bi-backup/centreon-bi-backup-reporting-server.sh --totalincr >> /var/log/centreon-bi/centreon-bi-backup-reporting-server-db.log 2>&1
0 12 * * * root bash /usr/share/centreon-bi-backup/centreon-bi-backup-reporting-server.sh --centreonbifiles >> /var/log/centreon-bi/centreon-bi-backup-reporting-server-files.log 2>&1

By default, backups are located in /var/backup

To modify this folder, update the BACKUP_DIR value in the backup script (line 83) located here: /usr/share/centreon-bi-backup/centreon-bi-backup-reporting-server.sh

Three types of backup are executed in the week:

  • daily backup for configuration files of generation reports’ engine, format: centreon-bin-reports-and-conf-aaaa-mm-jj.tar.gz
  • every Sunday a full ETL backup, format: mysql-centreon_storage-bi-aaaa-mm-jj.tar.gz
  • From Monday to Satursday an incremental backup ETL (all tables and only the last partition of partitioned tables), format: mysql-centreon_storage-bi-aaaa-mm-jj.tar.gz

Warning

During the backup of the reporting server, be sure that ETL scripts aren’t running. Moreover, no job report should be running.

Backups periodicity

  • Backup periodicity: daily
  • Backups rotation : 8 days

To modify this value, update RETENTION_AGE in the backup script (line 88) located here: /usr/share/centreon-bi-backup/centreon-bi-backup-reporting-server.sh

Note

We advise to export backups to another resource in order to secure them.