To restore the Certificate Hub database, follow the steps below in the same Certificate Hub version used when Backing up the database.

Restoring the database contents

Restore the Certificate Hub database using the Database Management System (DBMS) tools.

Restoring the database encryption key

Run the following command to restore the database encryption key.

sudo dbctl.sh restore -n <namespace> --backup-file <backup-file> [--kubectl-cmd <kubectl-cmd>]

Where each parameter has the value described below.

Option

Value

Mandatory

<namespace>

The namespace of the Certificate Hub instance

Always

<backup-file>

The path of the backup file.

Always

<kubectl-cmd>

The name of the kubectl client or equivalent command.

When the name of the command is not "kubectl"

For example:

sudo ./dbctl.sh restore -n cm --backup-file backup-06_19_2023.tar.gz.gpg

Before running this command, you can ignore or delete the user-creation and role-update jobs in ERROR state.

Completing the database restoration

Redeploy Certificate Hub to make effective the restoration of the database encryption key.