Puppet Enterprise 2019.0

For large PuppetDB installations, you can speed initial replication by manually copying the database from the master to the replica. If you have already started automatic provisioning, you can manually copy your PuppetDB at any time during sync.

The size of your PuppetDB correlates with the number of nodes and resources in your Puppet catalogs. To optionally examine the size of your database, on the PuppetDB PostgreSQL node, run sudo -u pe-postgres /opt/puppetlabs/server/bin/psql -c '\l+ "<DB_NAME>"'.

Note: By default, <DB_NAME> is pe-puppetdb.
  1. On the PuppetDB node, export the database:
    sudo -u pe-postgres /opt/puppetlabs/server/bin/pg_dump --format=custom --compress=3 --file=<DUMP_OUTPUT> --dbname="<DB_NAME>"
  2. On the PuppetDB node, transfer the output using your preferred tool, such as SCP:
  3. On the primary replica node, restore PuppetDB:
    sudo puppet resource service puppet ensure=stopped
    sudo puppet resource service pe-puppetdb ensure=stopped
    sudo -u pe-postgres /opt/puppetlabs/server/bin/pg_restore --clean --jobs=<PROCESSOR_COUNT> --dbname="<DB_NAME>" <REPLICA_DUMP_OUTPUT>
    sudo puppet resource service puppet ensure=running
    sudo puppet resource service pe-puppetdb ensure=running
    sudo puppet agent -t

After manual export and restore, PuppetDB automatically updates the replica with any changes that occurred on the master in the meantime.

Back to top
The page rank or the 1 our of 5 rating a user has given the page.
The email address of the user submitting feedback.
The URL of the page being ranked/rated.