Files
Cactidocumentation/Upgrading-Cacti.md
T
Thomas Vincent 361e85d172 docs: [1.2.x] document features the manual did not cover (#277)
* docs: [1.2.x] document features the manual did not cover

Add pages for the user profile settings and for the SNMP Agent and
its notification receivers, and link them from the front page. Add
sections on realtime graphs and CSV export to Viewing-Graphs, on the
data source statistics collection process to Settings-Data, and on
upgrading from 0.8.x to Upgrading-Cacti. Extend the RRDfile Cleaner,
RRDfile Checker and user log descriptions in System-Utilities,
document cli/add_datasource.php, and replace the Users, Groups and
Domains stub with an overview.

Labels, defaults, menu paths and options are taken from the Cacti
1.2.x source at 1523aa04b.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] add a manual page for every supported plugin (#282)

* docs: [1.2.x] add a manual page for every supported plugin

Add pages for Thold, Monitor, Maintenance, Intropage, Host MIB, APC UPS,
Evidence, FlowView, MikroTik, ReportIt, Router Configs, Service Check,
Slowlog, Weathermap and WMI, each with the same sections: requirements,
installation, permissions, settings, use, background processing,
command-line tools and troubleshooting. Bring the Syslog and MacTrack
pages to the same structure and add screenshots to MacTrack.

Each page documents the plugin's latest published release for Cacti
1.2.x and states that version; WMI has no release and follows its
development branch. Link the pages from the front page and the plugin
catalog, and correct the catalog's APC UPS and Router Configs
descriptions to match those releases.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] update front-page developer credits and GitHub profile links

Align the Active Developers, Contributors, Emeritus Members and In Memoriam entries in README.md with Cacti 1.2.x about.php (Cacti/cacti 3c4b7fde0): move Sean Mancini to Active Developers, Thomas Urban to Contributors, and Chris Bell and Jing Chen to Emeritus Members. Link each named developer and contributor to their verified GitHub profile.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-11-26 02:48:29 -08:00

8.3 KiB

Upgrading Cacti Under UNIX Compatible Operating Systems

Use only the supported operating systems and maintained dependencies compatible with this Cacti branch.

This procedure covers a source installation upgrading to Cacti 1.2.31. For a package-managed installation, use the package maintainer's upgrade procedure and configuration-file handling. See the separate guides for Windows and FreeBSD.

Review the release notes and requirements first. Schedule time to back up and restore the installation. Test the upgrade on an isolated copy of the database and files before changing production. Keep dependency upgrades separate unless a prerequisite requires them.

Stop writers before backing up

Turn off Data Collection Enabled under the poller settings. Also suspend the actual scheduler on each affected collector: disable only the Cacti cron entry, or stop its installed cactid service. Preserve the scheduler settings so they can be restored later. Do not disable all system cron jobs.

Wait for existing poller, Spine, script-server, Boost and other background jobs to finish. Prevent web requests and plugin jobs from changing the installation during the backup and upgrade. The application polling switch alone does not stop every running process or administrative writer.

If collectors use rrdcached, drain its pending writes using the procedure for that deployment before taking the RRD snapshot. Keep writers stopped until the database and file backups are both complete. Coordinate this on remote collectors as well as the main server.

Back up the database and complete installation

Record the installed Cacti, Spine, PHP and database versions, installation paths, service accounts, scheduler entries and remote-collector configuration. Store backups outside the web root with access restricted to administrators.

Back up the Cacti database with a client compatible with the database server. For example, with the application stopped and a backup account with the required privileges:

umask 077
BACKUP_DIR=/srv/backups/cacti-before-1.2.31
mkdir "$BACKUP_DIR"
mysqldump --user=backup_user --password --lock-tables --quick \
  --routines --events --triggers cacti \
  > "$BACKUP_DIR/cacti.sql"

Adjust the database name, account and paths before running these examples. Use mariadb-dump instead of mysqldump where appropriate. Enter the password at the prompt. Stop if a command fails; an output file alone does not prove a successful dump. The account needs the privileges required by the installed dump client, including table locks for the example above.

--single-transaction provides a consistent snapshot for transactional tables; it does not make nontransactional tables consistent. Inspect the actual storage engines and choose the backup method accordingly. Keep all application writers stopped for the corresponding file snapshot. See the database backup documentation for the option and privilege details.

Back up the complete installation, including the RRD files. For an example installation at /var/www/html/cacti:

tar -czpf "$BACKUP_DIR/cacti-files.tar.gz" -C /var/www/html cacti
tar -tzf "$BACKUP_DIR/cacti-files.tar.gz"

Preserve include/config.php, plugins, custom scripts, query resources and other local configuration. Include CSRF secret material, including an alternate $path_csrf_secret from the configuration. Back up separately any RRD, configuration or resource paths outside the installation tree. A tar archive normally preserves a symlink rather than including its external target. Retain the permissions and ownership needed for restoration.

Save the database user/grant definitions and any connection certificates needed to recreate access. These are not included in a dump of the Cacti database alone. Include site or plugin SQL routines and events, as in the example, and account for their additional backup privileges.

Back up remote-collector databases and local files where they hold state. Verify dump completion and archive contents, then rehearse restoration on an isolated system. Excluding *.rrd would leave monitoring history outside the recovery set.

Install the release files

Download the intended 1.2.31 distribution from the release page and extract it into a staging directory. Verify the package using the release's published verification information before using it. Keep the existing installation and its backup until the upgrade has been checked.

Copy the contents of the extracted directory into the existing installation, not the directory itself. For example, after extraction:

STAGING_DIR=/var/tmp/cacti-1.2.31
CACTI_DIR=/var/www/html/cacti
cp -a "$STAGING_DIR"/. "$CACTI_DIR"/

Confirm that the new files are directly under the installation root, such as $CACTI_DIR/poller.php, rather than a nested cacti-1.2.31 directory. Preserve the existing include/config.php and review new options in include/config.php.dist. Reconcile local code changes and plugin compatibility with the new files; copying the release is not a substitute for reviewing those changes.

Check permissions using the accounts that actually run the web server, poller and maintenance jobs. Those accounts need not be identical. Give the poller the required access to RRD and log paths, and check configured cache, resource and script paths. Preserve access needed by installation and package imports. Do not make the entire application tree writable as a permissions workaround.

Run and verify the upgrade

Allow an administrator to open the Cacti URL and follow the database-upgrade workflow. Review errors before proceeding. The release also provides cli/upgrade_database.php; consult its --help output if using the CLI workflow. Do not manually advance the database version or force a starting version merely to bypass an upgrade check.

Confirm the installed version, database-upgrade result, credentials, paths, plugin state and collector configuration. Check remote collectors individually and follow the applicable synchronization procedure; do not assume that two polling cycles prove their files and databases have upgraded successfully.

Restore web access and the saved scheduler configuration only after the upgrade checks succeed, then re-enable collection. Use either the configured cron path or the daemon for a collector, not both. Verify logs, data freshness and representative RRD updates after normal polling resumes.

Upgrading from Cacti 0.8.x

Cacti 1.2.x can upgrade a 0.8.x database directly. The installer runs the upgrade step of every release between the installed version and the new one, starting as far back as 0.8.1, so you do not need to install the intermediate releases.

The 1.0.0 step moves the tables of plugins that became part of Cacti into the core schema. For example, the Aggregate plugin tables plugin_aggregate_graph_templates and plugin_color_templates become aggregate_graph_templates and color_templates. Your existing data is kept under the new table names.

Take these additional precautions for an upgrade that spans major versions:

  • Test the upgrade on a copy of the database first, and note any errors before you upgrade the production system.
  • If you move to a new server at the same time, copy the RRDfiles only between systems of the same architecture, for example 64-bit to 64-bit with the same byte order. Otherwise, export each file with rrdtool dump on the old system and recreate it with rrdtool restore on the new one.
  • Check the database settings the installer recommends before you continue, and review custom templates, scripts and plugins, which may need updating for the new release.

Recovery

If the upgrade fails, keep writers stopped while deciding whether to retry or restore. Replacing PHP files alone does not undo a database migration. Restore the matching pre-upgrade database, application files, RRD data and external configuration or secret material, including affected remote-collector state. Verify the restored installation before re-enabling its schedulers. Restoring an earlier backup discards changes collected after that backup.


Copyright (c) 2004-2026 The Cacti Group