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!