Time for action – creating a cronjob

  1. Logon to your Cacti system.
  2. Create a crontab file:
    vi /etc/cron.d/cactiBackup
    
  3. Enter the following lines to this file:
    # Cacti Backup Schedule
    0 2 * * * root /bin/bash /backup/backupCacti.sh > /dev/null 2>&1
    
  4. Save the file and exit the editor.

What just happened?

You created a backup job which will start at 02:00 in the morning every day of the week. You now have a daily backup of your Cacti database and files.

Restoring from a backup

Now that you have a daily backup of your Cacti instance, what steps do you need to take to actually restore your backup? Let's have a look at the different tasks needed.

Restoring the Cacti database

Restoring the Cacti database involves using the standard mysql command.

Get Cacti 0.8 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.