Backup Exec script
Bl8ckr0uter
Inactive Imported Users Posts: 5,031 ■■■■■■■■□□
in Off-Topic
Ok so we have a script the runs and does a restore. The script has a static date that we have to change everyday (yuck). I have been trying to find a way to make it point to the system date. It needs to start on the current system date and end on the next date. Here is part of the script:
Sorry, I should mention that this is some sort of symantec scripting language for backup exec
Selection: START_DATE=11/30/2010 END_DATE=12/1/2010Anyone know how to do this?
Sorry, I should mention that this is some sort of symantec scripting language for backup exec
Comments
-
gosh1976 Member Posts: 441I don't know what the right syntax would be but I'm guessing something like START_DATE = GETDATE()
-
MentholMoose Member Posts: 1,525 ■■■■■■■■□□What OS, and what scripting language?MentholMoose
MCSA 2003, LFCS, LFCE (expired), VCP6-DCV -
Bl8ckr0uter Inactive Imported Users Posts: 5,031 ■■■■■■■■□□MentholMoose wrote: »What OS, and what scripting language?
2k3 and it is backup exec scripting language. -
Devilsbane Member Posts: 4,214 ■■■■■■■■□□can you use system variables in that? %date%Decide what to be and go be it.
-
Computadora Member Posts: 69 ■■□□□□□□□□
-
Bl8ckr0uter Inactive Imported Users Posts: 5,031 ■■■■■■■■□□Devilsbane wrote: »can you use system variables in that? %date%
I wish.Computadora wrote: »
I did read that and while it does say how to set a date, it doesn't say how to make the scripts use the system date. Thanks though. -
MentholMoose Member Posts: 1,525 ■■■■■■■■□□I'm not familiar with scripting BE. What's the script file name, and are there any hints at the scripting language at the top of the script file? It may just be a VBScript or batch file that is run by BE.
Anyway, this is how I'd do it on Linux with bash (not helpful but I already wrote it so whatever):TODAY=`date +%s` TOMORROW=$(($TODAY+86400)) START_DATE=`date +%D -d "1970-01-01 $TODAY sec"` END_DATE=`date +%D -d "1970-01-01 $TOMORROW sec"`
MentholMoose
MCSA 2003, LFCS, LFCE (expired), VCP6-DCV