Note, whoever wants to continue work on this issue, there is a work-in-progress solution at !271 (branch recovery-json) which you use.
recovery-json