For auditing purposes we are required to retain put puppet database for 7 years, how may I routinely dump it into a MySQL database, I might have some flexibility in the choice of databases, postgres or MySql.
Thanks in advance.
For auditing purposes we are required to retain put puppet database for 7 years, how may I routinely dump it into a MySQL database, I might have some flexibility in the choice of databases, postgres or MySql.
Thanks in advance.
If you're using Postgres as the backing store for PuppetDB, then you can just use the vanilla postgres tools (like pg_dump) to dump a complete copy of the db, then use psql or pg_restore to put that into a clean postgres database for archival purposes. Repeat as necessary.
PuppetDB also has a built-in "export" command (see the section in the puppetdb docs on "Exporting and anonymizing data"). That will dump out all of your current catalogs, facts, and reports into a tarball on disk. If your auditors just care about archival access to the raw data (i.e. it doesn't need to be in a DB for querying or anything), maybe that's sufficient?
PuppetDB doesn't work with MySQL as a backing store. If you want to dump its contents to a MySQL db, I'd recommend using the "export" I mentioned earlier, expanding that tarball, then writing a custom script that imports that data in MySQL.