Cacti System upgrade procedure

Updating Cacti can be easy or tricky depending on your system size and design.
In general, there are a few steps for a safe upgrade follow the below steps to properly and safely upgrade your cacti server

In this scenario, I am upgrading from Cacti 1.2.2 to 1.2.4 which is the latest release version at the time of this writing.



Step 1.) Stopping the poller cronjob this is important for consistency purposes we don’t want cron to run the polls while we are upgrading the system

add a # in front of the cron entry

#*/5 * * * * www-data php /var/www/html/cacti/poller.php > /dev/null 2>&1

Step 2.) Backup the cacti database

We use the mysqldump command to dump the database named cacti to cacti-backup.sql this is a very important step as the database contains all system settings such as user accounts and devices we are monitoring without the database your cacti instance will be back to scratch so again its important that we keep this backed up.

[email protected]:~# mysqldump -u root -p cacti > cacti-backup.sql
Enter password:
[email protected]:~# ls

Step 3.) Backup the existing cacti directory

In this case I am moving the cacti directory to the /tmp directory the cacti folder contains all of the files needed for cacti along with the graphs which are located in the RRA folder import notice if you have a large installation with many devices you might want to move this folder to a network share or something with a lot of space.

[email protected]:/var/www/html# cp -R cacti/ /tmp
[email protected]:/var/www/html#

Step 4.) Download the new version of cacti

I will be downloading the latest 1.2.4 release from the Cacti projects GitHub page wget
HTTP request sent, awaiting response… 200 OK
Length: unspecified [application/zip]
Saving to: ‘’ [ <=> ] 11.28M 6.26MB/s in 1.8s
2019-07-13 19:13:45 (6.26 MB/s) – ‘’ saved [11831094]


Step 5.) rename the current cacti directory in /var/www/html  to cacti-back

[email protected]:/var/www/html# mv cacti/ cacti-back


step 6.) copy the new cacti directory to /var/www/html

Moving the files in place of where the old files are essentially completes the upgrade we will need to apply the proper permissions as well

[email protected]:~# mv cacti/ /var/www/html/
[email protected]:~# chown -R www-data:www-data /var/www/html/cacti


Step 7.) copy the RRA and config file

this will copy your graphs along with your config file needed for cacti to access the database and other settings

[email protected]:~# cp /var/www/html/cacti-back/include/config.php /var/www/html/cacti/include/
[email protected]:~# cp -R /var/www/html/cacti-back/rra/* /var/www/html/cacti/rra/
[email protected]:~#


Step 8.) Browse to the cacti page which should now bring you the web installer to complete the upgrade



See my below video tutorial on this procedure!


Liked it? Take a second to support Sean Mancini on Patreon!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.