Troubleshooting backup and restore

If backup or restore fails, check for these issues.

The puppet-backup create command fails with the error command puppet infrastructure recover_configuration failed

The puppet-backup create command might fail if any gem installed on the Puppet Server isn't present on the agent environment on the primary server. If the gem is missing or has a different version on the primary server's agent environment, you get this error: command puppet infrastructure recover_configuration failed.

To fix this, install the missing or incorrectly versioned gems on the primary server's agent environment. To find which gems are causing the error, check the backup logs for gem incompatibility issues with the error message. PE creates backup logs as a report.txt whenever you run a puppet-backup command.

To see which gems,and which versions, you have installed on your Puppet Server, run: puppetserver gem list

To see what gems are installed in the agent environment on your primary server, run: /opt/puppetlabs/puppet/bin/gem list

The puppet-backup restore command fails with errors about a duplicate operator family

When restoring the pe-rbac database, if the restore process exits with errors about a duplicate operator family, follow these steps:

  1. Log into your PostgreSQL instance by running:
    sudo su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/bin/psql pe-rbac"
  2. Run these commands:
    ALTER EXTENSION citext ADD operator family citext_ops using btree;
    ALTER EXTENSION citext ADD operator family citext_ops using hash;
  3. Exit the PostgreSQL shell and re-run the backup utility.