---
title: "How to retrieve the PGP Encryption Key from a backup"
canonical: "https://support.appfire.com/space/SECS/477857121/How%20to%20retrieve%20the%20PGP%20Encryption%20Key%20from%20a%20backup"
format: markdown
---
> Macro (aura-html)

## Summary

<span style="color: #172b4d">When migrating the instance to another server, the existing Secure macros may fail to be decrypted due to a PGP Encryption key mismatch. When this happens, you will see an error similar to the image below.</span>

To solve this, you need to migrate the data of the **AO_DCA036_GLOBAL_KEY_PAIR ** table from the old database to the newly migrated instance's database.

![image](media://5627a2ed-3cd5-4ceb-991c-5832c25900d8)

## Environment

Confluence Server or Data Center

## Diagnostics Steps

When decrypting a Secure macro after migration, an "Error" box appears (shown above).

## Cause

<span style="color: #172b4d">PGP Encryption key mismatch after migration.</span>

## <span style="color: #172b4d">Resolution</span>

> ❌ Before proceeding with the steps below, we strongly suggest creating the necessary backups or testing the steps first in a staging instance. The steps result in direct database changes. By doing a test run, you can ensure steps are followed correctly and are making the necessary changes.

- restore the old backup into a new instance with a separate database

After restoring the backup into the new instance (let's name this instance ***Server A***)

check the **PASS_PHRASE**, **PRIVATE_KEY,** and **PUBLIC_KEY** from `AO_DCA036_GLOBAL_KEY_PAIR` database table of ***Server A***

- with the data, move to the new instance and update `AO_DCA036_GLOBAL_KEY_PAIR` table with the copied keys from ***Server A***

After this

- [clear the plugin cache](https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html?__hstc=72543820.4e76311f874131a99198a462418b615c.1662100942946.1677731714890.1677739840789.443&__hssc=72543820.160.1677739840789&__hsfp=179215543) (as recommended by Atlassian)

- check if the migrated secure macros can be decrypted

> 📝 On updating `AO_DCA036_GLOBAL_KEY_PAIR` with the new keys, any secure macros which were created previously in the instance will not be decryptable.


  


##