Cacti (home)ForumsDocumentation

Differences

This shows you the differences between two versions of the page.

manual:088:1_installation.3_upgrading [2012/11/05 20:44]
BSOD2600 Added Windows specific info.
manual:088:1_installation.3_upgrading [2014/11/07 19:48] (current)
BSOD2600 Windows cmd updates
Line 1: Line 1:
  
 ===== Upgrading Cacti ===== ===== Upgrading Cacti =====
 +
 +==== Linux ====
  
   - Backup the old Cacti database.<code>   - Backup the old Cacti database.<code>
Line 8: Line 10:
   - Backup the old Cacti directory.<code>   - Backup the old Cacti directory.<code>
 Unix shell> mv cacti cacti_old Unix shell> mv cacti cacti_old
-Windows shell> move cacti cacti_old 
 </code> </code>
   - Extract the distribution tarball.<code>   - Extract the distribution tarball.<code>
 Unix shell> tar xzvf cacti-version.tar.gz Unix shell> tar xzvf cacti-version.tar.gz
-Windows shell> Use favorite unzipping tool. 
 </code> </code>
   - Rename the new Cacti directory to match the old one.<code>   - Rename the new Cacti directory to match the old one.<code>
 Unix shell> mv cacti-version cacti Unix shell> mv cacti-version cacti
-Windows shell> move cacti-version cacti 
 </code> </code>
   - Edit "include/config.php" and specify the database type, name, host, user and password for your Cacti configuration.<code>$database_type = "mysql";   - Edit "include/config.php" and specify the database type, name, host, user and password for your Cacti configuration.<code>$database_type = "mysql";
Line 38: Line 37:
   - Copy the *.rrd files from the old Cacti directory.<code>   - Copy the *.rrd files from the old Cacti directory.<code>
 Unix shell> cp cacti_old/rra/* cacti/rra/ Unix shell> cp cacti_old/rra/* cacti/rra/
-Windows shell> copy cacti_old/rra/* cacti/rra/ 
 </code> </code>
   - 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.<code>   - 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.<code>
 Unix shell> cp -u cacti_old/scripts/* cacti/scripts/ Unix shell> cp -u cacti_old/scripts/* cacti/scripts/
-Windows shell> xcopy /D /S cacti_old/scripts/* cacti/scripts/ 
 </code> </code>
   - 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.<code>   - 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.<code>
 Unix shell> cp -u -R cacti_old/resource/* cacti/resource/ Unix shell> cp -u -R cacti_old/resource/* cacti/resource/
-Windows shell>  xcopy /D /S cacti_old/resource/* cacti/resource/ 
 </code> </code>
   - 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.<code>   - 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.<code>
 Unix shell> chown -R cactiuser rra/ log/</code>(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.) Unix shell> chown -R cactiuser rra/ log/</code>(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
-Windows - Follow the Windows [[http://docs.cacti.net/manual:088:1_installation.2_install_windows.10_configure_security|security guidelines]] + 
-  - Apply patches for [[1_installation.1_install_unix.7_apply_patches|Linux]] or [[1_installation.2_install_windows.9_apply_patches|Windows]]+==== Windows ====  
 +  Backup the old Cacti database.<code> 
 +C:\> mysqldump -l --add-drop-table cacti > mysql.cacti 
 +</code> 
 +<note>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.</note> 
 +  - Backup the old Cacti directory.<code> 
 +C:\> XCOPY /S cacti cacti_old  
 +</code> 
 +  - Extract the distribution zip file using your favorite unzipping tool. 
 +  - Rename the new Cacti directory to match the old one. 
 +  - Overwrite the existing Cacti directories and files with the new distribution. <code> 
 +C:\> MOVE cacti-version cacti 
 +</code> 
 +  - Edit "include/config.php" and specify the database name, host, user and password for your Cacti configuration. 
 +  - Copy the *.rrd files from the old Cacti directory.<code> 
 +C:\> XCOPY \cacti_old\rra\*.rrd \cacti\rra\ 
 +</code> 
 +  - 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.<code> 
 +C:\> xcopy /D /S \cacti_old\scripts\* \cacti\scripts\ 
 +</code> 
 +  - Copy any relevant custom resource XML files from the old Cacti directorySome resource XML files are updated between versionsTherefore, make sure you only over write if the XML files either don't exist or are newer than the distribution's.<code> 
 +C:\>  xcopy /D /S \cacti_old\resource\* \cacti\resource\ 
 +</code> 
 +  - Apply patches for [[1_installation.2_install_windows.9_apply_patches|Windows]] 
 +  - Follow the Windows [[http://docs.cacti.net/manual:088:1_installation.2_install_windows.10_configure_security|security guidelines]]
   - Point your web browser to:<code>   - Point your web browser to:<code>
 http://your-server/cacti/</code> http://your-server/cacti/</code>
   - Follow the on-screen instructions so your database can be updated to the new version.   - Follow the on-screen instructions so your database can be updated to the new version.
- 





Personal Tools