Please help me recover a broken LVM volume :( Are some files encrypted on the root FreePBX LVM volume?

Well, there’s some prehistory to better explain what I need to do. Something (let’s call it this way :smile: ) went wrong when I tried to convert my LVM volume to a mirrored raid… Not sure what exactly and why, but looks like some sync error occurred and the original volume was partly rewritten :frowning: Oh my god…

The thing is now I’m trying to recover everything which can be saved from this volume.

I have some success with this.
I was able to find with the recovery software some fragments of the backup files, and some mysql dumps can be extracted from it. Unfortunately, other files tar-gzipped in these backup files cannot be extracted as the tars are fragmented, but mysql dumps are good.

As well, I can recover the /etc/ and /var folders on my root volume, and it looks like they are in good condition. For example, asterisk.sqlite file is good, as well as a lot of config files.
The problem is, it looks like some of the /etc/ files are encrypted, because they contain a formatted base64 data or something similar. This data doesn’t look like some random broken data because of the base64-similar format of different files, which are supposed to be plain text. So, can you advise me how do I decrypt these files to put them in place?
Or, maybe this is not encryption but simply a bad data?

Your help is much appreciated. Thanks a lot!
Really hope to recover some of the settings as I’m too lazy to do a new and clean installation to build everything from very clean start :frowning: Stupid me, trust no one, for future make backups before you are going to make backups dealing with LVM :frowning: So sad story :slight_smile:

Nothing in /etc is encrypted; I think this is bad data. You could look up data recovery specialists in your area and try your luck there, but it’s generally expensive.

Look up the 3-2-1 backup rule :slight_smile:

1 Like

Back in freepbx 11 copying the /var/lib/mysql to a new installation with proper user rights have helped me save systems without a backup.

First copy this directory with cp -p to keep the user rights. Make a new installation using the same passwords, go to iax settings and just hit submit and then apply changes. Make a backup from freepbx to have something to return to if anything goes wrong. Now stop freepbx from command prompt copy the contents of the folder to the same location (don’t forget to use -p to keep rights) start freepbx and see if you can access the web interface. If you can, then go to iax settings, hit submit and apply changes and you are done. Check if the system works.

1 Like