Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.65k stars 406 forks source link

Backups & Restore GUI #691

Open cobusv opened 7 years ago

cobusv commented 7 years ago

It would really be awesome if there was a backup/restore section in the GUI in order to backup and restore your cacti data. This would really be helpful if you had a crash and need to restore to a previous state.

cigamit commented 7 years ago

I attempted to write a plugin to do this long ago, but the feasibility to have it working across all the various architectures out there isn't really worth the time and effort I would have had to put into it. Instead I really recommend that you have a proper backup mechanism in place, the same as all of your systems (Cacti isn't special). Anything we would have in the GUI would at best be backing up to the local system, so if the system crashed then you would still lose everything. You need to have a separate system backing up both the files and the database and storing it on a remote system.

ronytomen commented 7 years ago

This would be a plugin and would not be included in main line.

As @cigamit mentioned, there are really a few components you need to backup.

I'm changing this issue to a documentation task as we do need documentation on backing up Cacti.

cigamit commented 7 years ago

I would like to see backup handled in two ways. 1) support copying/rsyncing the RRDfiles to a shared location 2) backing up the database, resources, and scripts into a recoverable tar/zip file

jpobeda commented 7 years ago

Since you are planning to be selective I think it would be a good idea to include the plugin folder as well. Those running weathermap for example, will want to backup their map configs or the routerconfigs backup directory, IF they are within Cacti directory structure of course.

interduo commented 5 years ago

I think that the backup should be done in higher level. It's better for You to use hypervisor with lxc or kvm.

If You use LXC - You should have 2 backups.

If You use KVM - You could do only a snapshot with memory dump.

Only this strategy fully works in all problematic scenario.

Doing a backup of only one component rrds/db/files is complicated and hard to restore.

So the issue is much work whitch is done allready in another way as expected by author od this issue.

cigamit commented 5 years ago

There is also a case where some plugin developers have proprietary range partitioned tables. We have to have a regex to skip backing up files more than once, to handle them separately. We also need a way to skip backups for certain tables as indicated by @ronytomen