update before restore