Restore 03 add state backup

This is the part of restore that depends on state.