Quantcast
Channel: Data Protection Manager - File Protection forum
Viewing all articles
Browse latest Browse all 520

Post-backup script runs even if backup job fails

$
0
0

Hi,

I have been asked to back up a SQL database backups. It means, we have a SQL database which is backed up by SQL server itself: every day a full backup is executed, and every 30 minutes a transaction log backup occurs. These files should be quick accessible for a 1 day,  therefore, it is not a solution to backup SQL with DPM as SQL workflow; instead of this, DPM should back up this folder as file folder.

So, in DPM scripting configuration, I've specified two scripts:

A pre-backup script checks if any SQL backup job is performing. When SQL performs a custom backup script, it generates a file with .stop exstension. DPM pre-backup script checks presence of this file. If this file exists, then pre-backup script generates another file named "DONOTDELETE" for post-backup script.

A post-backup script checks if file "DONOTDELETE" exists; if exists then it will not clean up the backup folder; else, script will delete anything in backup folder.

Both the scripts send me an e-mail about results.

the DPM schedule executes once per a day. Yesterday, I've noticed that the backup job was failed due to insufficient replica volume space, but the post-backup script was executed (an e-mail from post-backup script was sent) and the backup folder on the SQL server has been cleaned. And an hour later, a backup job was executed successfully again.

Thanks God this issue was occured in dev environment. So, two questions:

1. Is it by design that post-backup scripts run regardless of success of backup job?

if YES, then

2. Can I prevent execution of post-backup scripts in case if backup job fails?


Viewing all articles
Browse latest Browse all 520

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>