Restore Job to have Run custom scripts

I’d like to request the ability to run custom scripts (SQL and/or CMD) after a Restore Job completes, similar to the before/after script functionality that already exists in Backup Jobs.

Use case: After a restore, we often need to run a SQL script to perform post-restore tasks — for example, updating configuration values, remapping users, fixing linked server references, or sanitising data for a non-production environment. Currently there is no way to do this natively within a Restore Job, so we have to work around it using Windows Task Scheduler and sqlcmd outside of SQLBackupAndFTP.

Proposed addition:

  • A “Run custom scripts” section in the Restore Job settings, mirroring what exists in Backup Jobs
  • Support for both SQL scripts and CMD/batch scripts
  • An equivalent of the @SQLBAK_JOB_SUCCESS variable so scripts can conditionally execute only on a successful restore

This would make Restore Jobs significantly more useful for automated workflows, particularly for scenarios like refreshing dev/test environments from production backups.

Thanks for considering this!

Hi Nehal,

Thank you for the detailed suggestion!

This is a very reasonable request. We already support custom scripts for Backup Jobs, so adding similar functionality to Restore Jobs is a natural extension.

We plan to implement this feature in the near future, including support for both SQL and CMD scripts after a restore completes.

Thank you again for taking the time to share your feedback—it helps us prioritize improvements that are valuable to our users.

1 Like