restore and commit