Add cookbook recipe for persistence. Fixes #2946.