Backup of Centreon MAP server

Saved items

The saved items are:

  • Saving configuration files (/etc/centreon-studio)
  • Saving database centreon_studio

How it works ?

The backup script is executed on a daily basis (2AM) with a cron job located in /etc/cron.d/centreon-map-server-backup:

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

# rewrite file with new cron line
CRONTAB_EXEC_USER=""

0 2 * * * root bash /usr/share/centreon-map-server/cron/centreon-map-server-backup.sh >> /var/log/centreon-map-server/centreon-map-server-backup.log 2>&1

The backup centreon-map-server-yyyy-mm-dd.tar.gz is stored in BACKUP_DIR, which is defined in configuration file.

Backup parameters

Backup parameters are stored in /etc/centreon-studio/backup.conf

  • ENABLE: enable/disable backup mechanism (default value: 0)
  • BACKUP_DIR: where the backup is stored (default value: /var/backup)
  • RETENTION_AGE: backup retention in days (default value: 8)

Note

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