While troubleshooting a faulty partition on a Macbook, I accidentally wrote a new partition table using Testdisk (from a bootable USB running Ubuntu). I forgot to backup original table! The data partition was encrypted, but I had been running a decryption from Disk Utility for 2 days, so it should have been decrypted by now.
How should I proceed to recover the lost partition?
Update 1 So the corrupt startup disk has this partition table (upper part of picture), and a clean OSX installation on a new disk with the same size as the corrupt disk, has the lower partition table in the picture:
Would it be safe to say, that the corruption in the partition table is "just" that the Boot (recovery) partition, has been replaced with Data partition (Mac HFS), and all I need to do is set the correct sectors again using pdisk? I have only read about pdisk, and is a bit reluctant to do it.