RTM backups

This topic provides guidance about what to back up and how often so as to minimize data loss.

Maintenance

RTM does a daily, default maintenance backup at 00:00. This default backup is for RTM settings and configurations, not a full RTM backup.

The RTM settings and configuration backup and is stored under RTM_TOP/cacti/backup/cacti_db_backup_xx.tgz. See Console > Configuration > RTM Settings > Maint > Database backups for configuration settings.

The amount of data lost during a disaster can be minimized by turning on partitioning in RTM, and then backing up the partitions separately under RTM_TOP/backup/partition_backups/*.tgz. The partition settings are in Console > Configuration > RTM Settings > Maint > Large System Settings.

Directories

Table 1. RTM directories
Directory Recommended backup policy
RTM_TOP/advocate Daily
RTM_TOP/cacti Daily
RTM_TOP/flexlm Daily
RTM_Top/ioncube Daily
RTM_TOP/rlm1 Daily
RTM_TOP/rtm Daily
RTMP_TOP/spine Daily
RTM_TOP/cacti/rra2 rsync or equivalent every hour

1 Only if using Reprise License Manager

2 The rra directory contains the round robin data files used to build RTM graphs

Cacti database

Backup the content of the MariaDB by using the mysqldump command on an appropriate interval (recommend daily):
mysqldump --lock-tables=FALSE cacti > /somewhere/somefilename.sql
Note: A simple file backup does not work for the database files and is a waste of effort. If you are using table partitioning, specifically exclude these tables from mysqldump and then backup just the partitions by means of RTM_TOP/backup/partition_backups/*.tgz.

For more information, see Back up and restore the RTM system settings.

Customizations

Your customizations, if any, are found in the following directories:
Table 2.
Directory Recommended backup policy
RTM_TOP/cacti/plugins Daily
RTM_TOP/cacti/scripts Daily
RTM_TOP/cacti/resource Daily

Additional configurations

Additional configurations recommended to be backed up daily include PHP, MariaDB, Cron, and other miscellaneous items that are outside of RTM_TOP in the following paths:
  • /etc/php.ini
  • /etc/php.d/*
  • /etc/my.cnf
  • /etc/my.cnf.d/*
  • /etc/cron.d/cacti
  • /etc/rsyslog.conf
  • /etc/rsyslog.d/*
Note: The paths depend on the OS vendor and version. For example, the listed paths and files are for RHEL 7.X.