Revert changes done to restore.php in #30479 to fix build