update restore-script to last core changes.