Cacti (home)ForumsDocumentation
Table of Contents

Upgrading Cacti

Linux

  1. Backup the old Cacti database.
    shell> mysqldump -l --add-drop-table cacti > mysql.cacti

You will probably have to specify the -u and -p flags for the MySQL username and password. This user must have permission to read from Cacti's database or you will end up with an empty backup.

  1. Backup the old Cacti directory.
    Unix shell> mv cacti cacti_old
  2. Extract the distribution tarball.
    Unix shell> tar xzvf cacti-version.tar.gz
  3. Rename the new Cacti directory to match the old one.
    Unix shell> mv cacti-version cacti
  4. Edit “include/config.php” and specify the database type, name, host, user and password for your Cacti configuration.
    $database_type = "mysql";
    $database_default = "cacti";
    $database_hostname = "localhost";
    $database_username = "cactiuser";
    $database_password = "cactiuser"
    $database_port = "3306";
    $database_ssl = false;
    
    /*
       Edit this to point to the default URL of your Cacti install
       ex: if your cacti install as at http://serverip/cacti/ this
       would be set to /cacti/
    */
    $url_path = "/cacti/";
    
    /* Default session name - Session name must contain alpha characters */
    #$cacti_session_name = "Cacti";

    The $plugins array has been removed from Cacti 1.0. Cacti will no longer support plugins written using the Plugin Architecture 1.0. All plugins that have not been confirmed working with Cacti 1.0 will be disabled upon upgrade. You should check the Github repo at Cacti Github Repository for newer versions of your favorite plugins before you upgrade.

    Unix shell> cp cacti_old/rra/* cacti/rra/
  5. Copy any relevant custom scripts from the old Cacti directory. Some script are updated between versions. Therefore, make sure you only over write if the scripts either don't exist or are newer than the distribution's.
    Unix shell> cp -u cacti_old/scripts/* cacti/scripts/
  6. Copy any relevant custom resource XML files from the old Cacti directory. Some resource XML files are updated between versions. Therefore, make sure you only over write if the XML files either don't exist or are newer than the distribution's.
    Unix shell> cp -u -R cacti_old/resource/* cacti/resource/
  7. Set the appropriate permissions on Cacti's directories for graph/log generation. You should execute these commands from inside Cacti's directory to change the permissions.
    Unix shell> chown -R cactiuser rra/ log/
  8. Cacti 1.0 also includes the definition of a Site object. This Site objects requires you to select a timezone. Therefore, you have to first install the MySQL Timezone Database, and grant the cactiuser SELECT access to it. The instructions below explain how that will be accomplished on Linux/UNIX.
    Unix shell>mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -uroot -p mysql
    Unix shell>mysql -uroot -p -e "grant select on mysql.time_zone_name to 'cactiuser'@'localhost' identified by 'cactiuser'"

Windows

  1. Backup the old Cacti database.
    C:\> mysqldump -l --add-drop-table cacti > mysql.cacti

You will probably have to specify the -u and -p flags for the MySQL username and password. This user must have permission to read from Cacti's database or you will end up with an empty backup.

  1. Backup the old Cacti directory.
    C:\> XCOPY /S cacti cacti_old 
  2. Extract the distribution zip file using your favorite unzipping tool.
  3. Rename the new Cacti directory to match the old one.
  4. Overwrite the existing Cacti directories and files with the new distribution.
    C:\> MOVE cacti-version cacti
  5. Edit “include/config.php” and specify the database name, host, user and password for your Cacti configuration.
  6. Copy the *.rrd files from the old Cacti directory.
    C:\> XCOPY \cacti_old\rra\*.rrd \cacti\rra\
  7. Copy any relevant custom scripts from the old Cacti directory. Some script are updated between versions. Therefore, make sure you only over write if the scripts either don't exist or are newer than the distribution's.
    C:\> xcopy /D /S \cacti_old\scripts\* \cacti\scripts\
  8. Copy any relevant custom resource XML files from the old Cacti directory. Some resource XML files are updated between versions. Therefore, make sure you only over write if the XML files either don't exist or are newer than the distribution's.
    C:\>  xcopy /D /S \cacti_old\resource\* \cacti\resource\
  9. Apply patches for Windows
  10. Follow the Windows security guidelines
  11. Point your web browser to:
    http://your-server/cacti/
  12. Follow the on-screen instructions so your database can be updated to the new version.





Personal Tools