How can we help you today? How can we help you today?

Delete Backups after a successful restore

I am using the restore feature of Backup Pro 7, to test the backups by restoring to a new database .
The software has a facility to drop the new database on successful restore.

I would also like to use the successful restore status to delete old backups.

Does anyone have any ideas ?

Thanks in advance

David Scott
dscott_msc
0

Comments

1 comment

  • petey
    Do you mean you want to delete the backup file the database was restored from? There isn't a way to do this easily. The closest way I can think of is to use the ERASEFILES_PRIMARY option with the value '1h', which means that your backup file needs to be older than one hour at the time of the restore, in order for it to be deleted. Outside of SQL Backup, if you're running the restore tests using a scheduled job, one suggestion is to rename the backup file to a known name, perform the restore, then delete that backup file.
    petey
    0

Add comment

Please sign in to leave a comment.