Backup Exec 2012 – Removing bkf files from failed jobs

26.01.2013

I have created simple script which finds failed/error backup jobs (Backup Exec 2012) and removes related bkf files from disk (because the files are not valid for restore anymore). The scripts needs to be modified based on your environment. The script also creates basic log (list of failed jobs and removed files) in specified directory. Useful thing could be variable $TimeStamp which give us power to modify time how long we want to go back in BEJobHistory.

Note: The script can be scheduled in Task Scheduler with action Start a Program –  “Program/script:” PowerShell.exe and “Add arguments (optional):”  script file path (e.g. D:\RemovedFiles\RemovingFailedJobFiles.ps1) because of using Import-Module -Name BEMCLI inside.

Download:RemovingFailedJobFiles.ps1

Log example: 26-01-2013-0120-Log.txt