Hello all,
I am trying to set up automated backups of my database, but I'm not sure what the best practice is. My current plan is to make a script that will pause the poller and mysql, then use tar to make a copy of these two directories, which I'll then ftp offsite:
/var/lib/mysql/
/var/www/html/cacti/
Would that be sufficient? I thought I had sufficient backups in the past, but I had missed the ibdata1 table, so I'm now just doing the entire mysql directory.
Separately, what is the most graceful way to halt cacti and mysql via command line so that I can make a stable backup? My understanding is that trying to copy those folders while the poller is running will cause corruption in my backup. I assume just stopping the mysqld service isn't ideal.
I'm sorry if this is a redundant post. I searched the forums and found a post referencing a pre-2006 discussion page about this, but I wasn't able to actually find the discussion.
Thank you!
Chris
Best Practices for Cacti Backups
Moderators: Developers, Moderators
Re: Best Practices for Cacti Backups
Depending on your flavour of linux... you could stop the poller, create a clone / snapshot of the disk, which you can then use to backup the relevant data so it doesn't change as you backup. This would also allow you to catch the MySQL databases and RRD files, all of which are used to make Cacti work.
As for your location paths, well that depends on the OS you are using, whether you've done a manual install or package install etc.
Just remember that the three main things are Cacti Website (sources), RRD files (data), MySQL (cacti configuration, device lists, etc).
If you are running as a VM, would be better to snapshot the whole machine.
As for your location paths, well that depends on the OS you are using, whether you've done a manual install or package install etc.
Just remember that the three main things are Cacti Website (sources), RRD files (data), MySQL (cacti configuration, device lists, etc).
If you are running as a VM, would be better to snapshot the whole machine.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Who is online
Users browsing this forum: No registered users and 8 guests