Time for action – backup your Cacti files
Logon to your Cacti system.
Go to the root directory:
cd /
Execute the following command to create a backup of all the files defined earlier:
tar -czvpf /backup/cacti_files_20101004.tgz ./etc/cron.d/cacti ./etc/php.ini ./etc/php.d ./etc/httpd/conf ./etc/httpd/conf.d ./etc/spine.conf ./usr/local/spine ./var/www/html/cacti ./var/www/html/cacti-0.8.7g
Verify that the backup file exists by issuing the following command:
ls -l /backup
A listing similar to the following will be displayed:
What just happened?
You just created your first complete backup that contains all the files and directories you defined and is also already compressed. Together with the database backup, you are now able to restore your Cacti installation.
Enhancing the database backup script
Now
that you know how to backup the database and the Cacti-related files, you can add the tar
command to the backup script which you created earlier.