Serialize the recovery type.

Closes #6190