# Is there a way to decrypt the files previously encrypted under different keys

**URL:** <https://community.open-emr.org/t/is-there-a-way-to-decrypt-the-files-previously-encrypted-under-different-keys/21824>\
**Category:** Day-to-Day Users\
**Tags:** question\
**Created:** [January 14, 2024, 12:06am UTC](https://community.open-emr.org/t/is-there-a-way-to-decrypt-the-files-previously-encrypted-under-different-keys/21824 "2024-01-14T00:06:05Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![juggernautsei](https://community.open-emr.org/user_avatar/community.open-emr.org/juggernautsei/32/10764_2.png) [@juggernautsei](https://community.open-emr.org/u/juggernautsei)\
**Post date:** [January 18, 2024, 11:33am UTC](https://community.open-emr.org/t/is-there-a-way-to-decrypt-the-files-previously-encrypted-under-different-keys/21824/12 "2024-01-18T11:33:47Z")

</div>

The point of this thread is to make sure there is no way around lost keys to warn others.  
Here is the original thread

> [@Upgrade from v5.0.2 to v7.0.0 failed](https://community.open-emr.org/t/upgrade-from-v5-0-2-to-v7-0-0-failed/20382):
>
> The upgrade fails with this error messages OpenEMR Error : Decryption failed authentication. OpenEMR Error : Key in drive is not compatible (ie. can not be decrypted) with key in database - Exiting. PHP 8.1.2-1 ubuntu 2.11 Apache/2.4.52 Here were the steps taken to get here. Created new server to move to. Install dependencies from the dependencies page Followed the instructions to upgrade from the upgrade page Backup database from v5 and imported into a new empty database …

This is where the key issue happened during a migration from v5 server to v7 server. The purpose for building the new server was because at the time there was two things that needed upgrading. The OS and PHP. I had tried in place upgrading of the OS but that brakes the LAMP stack. And I had not found a way to fix it. Now, I have finally learned all the steps it takes to do an OS upgrade of Ubuntu and fix the Lamp stack after the upgrade. I will no longer have to move the program from one server to another. This way I should be able to keep the key set intact.

---

_[View the full topic](https://community.open-emr.org/t/is-there-a-way-to-decrypt-the-files-previously-encrypted-under-different-keys/21824)._
