Backup and restore procedures
As with any other application or data, you should always have well planned out and properly documented backup and restore procedures in place in order to keep your data secure. Backing up the Cacti data assures you that you're not going to lose weeks or even years of valuable performance data. Although the following steps show you how to backup Cacti to the local system, you should save the backup files to a remote system. Off-site backups are also a good idea.
The MySQL database
MySQL
comes with a basic backup application called mysqldump
which dumps the content of one or more databases out to a plain text file. You will be using this program to create your database backup file, but we'll further enhance its functionality by wrapping it in a shell script to automate the filename and compressions tasks.