update and restore