Restoring from a backup
Now, it is time to restore your Cacti from the backup. Like the backup, the restore process also has two parts, first files and then the database. Before restoring it, we need to remove the old Cacti files:
$ rm rf /path/to/oldcacti
This command will remove old Cacti files, so be careful before doing this. Then, we will restore files:
$ cp a /path/to/backup/cacti /path/to/cacti
Your files are ready. Now, let's restore the database:
$ mysql ucacti pcacti987 cacti < cacti_xx_yy_zz.sql
This command will restore the database. You need to make sure that the MySQL server has a Cacti user with the appropriate password and also a blank database called cacti
.
Our files and database are ready, now we have to create a cron job that will run poller.php
every five minutes:
$ nano /etc/cron.d/cacti
And paste following text there:
*/5 * * * * www-data php /var/www/cacti/poller.php > /dev/null 2>&1
Now, open Cacti in your browser. If you are getting any MySQL related...