Keychain management command-line utility
I haven't tried recovering data with it yet but I think the following works:

security create-filevaultmaster-keychain ~/Desktop/FileVaultMaster.keychain

security export -k ~/Desktop/FileVaultMaster.keychain -t certs -o ~/Desktop/FileVaultMasterPublic.cer

sudo fdesetup changerecovery -institutional -certificate ~/Desktop/FileVaultMasterPublic.cer


In my case FileVault was already enabled so I just added it after the fact.