Backing up Centreon MBI¶
Backing up Centreon MBI Server’s data on the Centreon server¶
Items to back up:¶
Custom report designs and their settings
Generated reports.
How the backup script works¶
The backup script is executed on a daily basis using 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 saved to /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 designs need to be backed up. The backup format is centreon-bi-front-reports-and-custom-conf-aaaa-mm-jj.tar.gz
Backup frequency¶
Daily
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.
Backing up 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 check free space run the following command by entering the name of the Volum Group:
# vgdisplay vg_data | grep -i free
Items to back up:¶
Configuration files
Aggregated data
Reports & resources.
How the backup script works on the 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 saved to /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 during the week:
Daily backup of configuration files for the report generation engine. Format: centreon-bin-reports-and-conf-aaaa-mm-jj.tar.gz
Every Sunday, full ETL backup. Format: mysql-centreon_storage-bi-aaaa-mm-jj.tar.gz
From Monday to Satursday an incremental ETL backup (all tables and only the last partition of partitioned tables). Format: mysql-centreon_storage-bi-aaaa-mm-jj.tar.gz
Warning
During backup of the reporting server, ensure that no ETL scripts are running. No job reports should be running either.
Backup frequency¶
Daily
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 exporting backups to another server for even better security.