Database maintenance

You can optimize the Puppet Enterprise (PE) databases to improve performance.

Enable the pe_databases module

The pe_databases module helps you back up, manage, and tune your PE databases. The module is installed in the $basemodulepath directory as part of the PE installation or upgrade process, but it must be enabled for you to take advantage of its capabilities.

Note: If you have recently upgraded PE and were previously using a version of the module you downloaded from the Forge, we recommend you upgrade to the version included with your new PE installation to avoid unexpected changes.

To enable the pe_databases module, change the puppet_enterprise::enable_database_maintenance parameter to true.

  1. Set the value of the enable_database_maintenance module to true.
    puppet_enterprise::enable_database_maintenace: true
  2. Run Puppet: puppet agent -t

Databases in Puppet Enterprise

PE uses PostgreSQL as the backend for its databases. Use the native tools in PostgreSQL to perform database exports and imports.

The PE PostgreSQL database includes the following databases:

Database Description
pe-activity Activity data from the Classifier, including user, nodes, and time of activity.
pe-classifier Classification data, all node group information.
pe-puppetdb PuppetDB data, including exported resources, catalogs, facts, and reports.
pe-rbac Role-based access control data, including users, permissions, and AD/LDAP info.
pe-orchestrator Orchestrator data, including user, node, and result details about job runs.

List all database names

Use these instructions to list all database names.

To generate a list of database names:

  1. Assume the pe-postgres user:
    sudo su - pe-postgres -s /bin/bash
  2. Open the PostgreSQL command-line:
    /opt/puppetlabs/server/bin/psql
  3. List the databases:
    \l
  4. Exit the PostgreSQL command line:
    \q
  5. Log out of the pe-postgres user:
    logout