Do I need to backup PuppetDB? If so, how?
I've seen conflicting answers on this question. Does PuppetDB need to be backed up? How should it be backed up, if yes?
I think it depends on how critical the database of your resource state is.
In my opinion, I don't find backing up PuppetDB useful. Because PuppetDB stores the current state of resources, I feel that simply letting a new / empty PuppetDB database collect the current state of resources is good enough.
However, if your systems rely on having access to the current state immediately, then you should do some type of backup. For example, if you implement an empty PuppetDB database, you will have wait up to an hour before all resources have been collected and all nodes know ... (more)
As with any question of this sort, it depends on what you want to do.
At the time of me writing this - PuppetDB stores:
What needs this data? Exported resources for one ... and if you are using any PuppetDB query funcitons - yep its needed. The thing is though, this data can be repopulated in a giffy by running Puppet again on all hosts. So what are the risks here:
I agree with jtopjian. However, to answer the original question, you should be able to back up PuppetDB by simply using standard tools to back up the underlying database. i.e. Use a postgres backup tool if you're using the postgres backend. There is nothing that gets persisted in the Puppet DB front-end (Java-side).
Asked: 2012-12-19 12:53:23 -0500
Seen: 1,352 times
Last updated: Aug 15 '13