I've been using Veeam successfully for a while now, however I am attempting to fine tune our backup solution as data has increased it is causing my previously working copy to tape script to have an issue.
Basically the script identifies the Day of the Week, and on a Saturday it calls a different job (different tape retentions) however as jobs are now dragging onto Saturday morning I am duplicating the amount of data being sent offsite (not 100% of the time but enough to be a pain) are there any scripting wizards that have written something to detect day of the week and not rerun multiple times in a day?
This code is my current job, I guess I could make use of flag files and if exists type thing but I'm really a novice at writing scripts so it would end up being a mother of a script that probably will end up failing
Thanks for your reply, whilst this would certainly deal with the duplicate data issue, I need the script to identify the day of the week so that I can remove certain tapes offsite that are produced on a different day (fulls over incremental).
I guess you could somehow use job start parameter and compare it with the current date. For example if the backup job was not triggered on Saturday, then use "daily" BE backup job, otherwise trigger a "weekly" BE job.
As for job start date parameter, then I believe you can retrieve it via PowerShell pretty easily. Hope our PS guru Seth Bartlett would be able to assist you with this.
Okay so, does this script run every day and if it's Saturday, it runs one set of scripts for backup to tape retention, and any other day it runs another script. I'm not exactly sure I'm seeing the issue here. I'm guessing Friday is bleeding into Saturday and what is happening is that your script runs at the end of the job and see's that it is saturday and runs that script, and then on Saturday, does it again?
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
1) the backups bleed over the midnight time period therefore a simple "day of the week" script isn't going to clearly identify a daily from a weekly without an AM /PM stamp check. (As you highlighted it pretty much runs everything after midnight so does two lots of weeklies in some places)
2) I need weekly tapes run on the Friday night backups (a specific day Fri/Saturday either is good) my level of scripting/powerscripting is just about enough to get the backup identifying the day of the week (see my above script which I copied from another source). I haven't got much of an idea how to get this done "elegantly" hence the reason for asking here I would have expected alot of people running different retention to tapes dependent on the day?
Thanks for any help as this one is causing us to come close to missing backup windows.
Okay, so the script you have above is what you are using as a post-job script within Veeam I'm guessing? You want 1 script that if it runs on m-f, kicks off "C:\Program Files\Symantec\Backup Exec\bemcmd.exe" -o1 -jActinium_Backup and if the job ran on Saturday, you want it to kick off "C:\Program Files\Symantec\Backup Exec\bemcmd.exe" -o1 -jActinium_Weekly.
Am I correct in this? So you basically need a script that can differentiate when the job was started, rather than what day/time it's ending?
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
If I need to explain the code further, please let me know. Your best bet would be to put this script into a file called "tape.ps1" or something with .ps1 and put it in your C:\ drive. From there, the post job command would be like this:
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Excellent - thanks alot for this, I was looking at powershell - however I cant seem to get it to call the executable for the jobs, is it best to put the commands for the actual job into a batch file and get the ps1 file to call the batch file, as using the full bemcmd job script causes parameter issues on the -o1 part of the Invoke-Item.
There aren't really executables for the jobs, you may need to uninstall/reinstall veeam and add powershell in (all your job information will still hold). You could get the ps1 to call a batch file but really, where I placed "RunSaturdayJob" you should be able to just put in "C:\Program Files\Symantec\Backup Exec\bemcmd.exe" -o1 -jActinium_Backup
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.