on 09-23-2008 12:24 PM
Hi, We are looking for a command line script to perform a daily backup of the Business Objects configuration, not from the GUI based wizard
Is that possible?
Assuming the FileStore is in H:\ in your server, here is the vbs code to back up the FileStore automatically.
Backup will be stored in E:\BOBackups folder. You have to stop CMS, I/P and O/P FRS before trigerring/scheduling the script with a batch (*.bat) file. If you want full auto scripts let me know.
###########################################################################
Dim backupdir
Dim stuffToBackup
Dim dtmDateTimeNow
Dim dtmYYYY
Dim dtmMM
Dim dtmDD
Dim dtmHH
Dim dtmMN
Dim dtmSS
'Get the current Date and Time
dtmDateTimeNow = now
'Parse out the individual date/time fields
dtmYYYY = DatePart("yyyy", dtmDateTimeNow)
dtmMM = DatePart("m", dtmDateTimeNow)
dtmDD = DatePart("d", dtmDateTimeNow)
dtmHH = DatePart("h", dtmDateTimeNow)
dtmMN = DatePart("n", dtmDateTimeNow)
dtmSS = DatePart("s", dtmDateTimeNow)
'Since we are going to use the month, day, hour, and seconds
'in the file name, we want them to always be the same length.
'So, pad them with a zero on the front if they are less than 10.
'For example, May would normally be just "5", but make it "05".
If dtmMM < 10 Then
dtmMM = "0" & dtmMM
End if
If dtmHH < 10 Then
dtmHH = "0" & dtmHH
End if
If dtmMN < 10 then
dtmMN = "0" & dtmMN
End if
If dtmDD < 10 Then
dtmDD = "0" & dtmDD
End if
If dtmSS < 10 Then
dtmSS = "0" & dtmSS
End If
'Now that the year, month, day, hour, minutes, and seconds have
'been parsed out, build the Backup File Name (and path) for
'the .zip file.
BackUpFName = "E:\BOBackups\Filestore-" & dtmYYYY & "-" _
& dtmMM & "-" _
& dtmDD & "_" _
& dtmHH & "-" _
& dtmMN & "-" _
& dtmSS _
& ".zip"
'Initialize the directory name, in which the "Filestore" folder exists.
DirToBackup = "H:\"
Set objShell = CreateObject("WScript.Shell")
'Set the currenty directory, so WinZip will only backup the one folder,
'the "Filestore" folder.
objShell.CurrentDirectory = DirToBackup
'Kill some time while waiting for the Output File Repository Server to fully stop
Wscript.Sleep 80000
objShell.Run "wzzip -P -r " & BackupFName & " Filestore\*.*",1,False
WScript.Quit()
###########################################################################
I have similar kind of script for backing up Oracle database CMS repository. Below is the vbs code...
###########################################################################
Dim backupdir
Dim stuffToBackup
Dim dtmDateTimeNow
Dim dtmYYYY
Dim dtmMM
Dim dtmDD
Dim dtmHH
Dim dtmMN
Dim dtmSS
Dim OracleLogonInfo
Dim OracleExportParfileInfo
Dim OracleExportPathAndFileName
Dim OracleExportCommand
OracleLogonInfo = " boi_boxi_repository/<password>@cbcboxip"
Wscript.Echo "OracleLogonInfo: " & OracleLogonInfo
OracleExportParfileInfo = " parfile=F:\bobackups\params-cbcmrkbox001.dat "
Wscript.Echo "OracleExportParfileInfo: " & OracleExportParfileInfo
'Set the NLS_LANG environment variable for the Oracle Export
Set objShell = WScript.CreateObject("WScript.Shell")
Set colUsrEnvVars = objShell.Environment("USER")
strCurrentValue = colUsrEnvVars("NLS_LANG")
colUsrEnvVars("NLS_LANG") = "AMERICAN_AMERICA.US7ASCII"
Wscript.Echo colUsrEnvVars("NLS_LANG")
'Get the current Date and Time
dtmDateTimeNow = now
'Parse out the individual date/time fields
dtmYYYY = DatePart("yyyy", dtmDateTimeNow)
dtmMM = DatePart("m", dtmDateTimeNow)
dtmDD = DatePart("d", dtmDateTimeNow)
dtmHH = DatePart("h", dtmDateTimeNow)
dtmMN = DatePart("n", dtmDateTimeNow)
dtmSS = DatePart("s", dtmDateTimeNow)
'Since we are going to use the month, day, hour, and seconds
'in the file name, we want them to always be the same length.
'So, pad them with a zero on the front if they are less than 10.
'For example, May would normally be just "5", but make it "05".
If dtmMM < 10 Then
dtmMM = "0" & dtmMM
End if
If dtmHH < 10 Then
dtmHH = "0" & dtmHH
End if
If dtmMN < 10 then
dtmMN = "0" & dtmMN
End if
If dtmDD < 10 Then
dtmDD = "0" & dtmDD
End if
If dtmSS < 10 Then
dtmSS = "0" & dtmSS
End If
'Now that the year, month, day, hour, minutes, and seconds have
'been parsed out, build the Oracle Export File Name
'(and path) for the .dmp file.
OracleExportPathAndFileName = "F:\bobackups\boi_boxi_repository-" _
& dtmYYYY & "-" _
& dtmMM & "-" _
& dtmDD & "_" _
& dtmHH & "-" _
& dtmMN & "-" _
& dtmSS _
& ".dmp"
Wscript.Echo "OracleExportPathAndFileName: " & OracleExportPathAndFileName
OracleExportCommandLine = "exp" _
& OracleLogonInfo _
& OracleExportParfileInfo _
& "file=" & OracleExportPathAndFileName
Wscript.Echo "OracleExportCommandLine: " & OracleExportCommandLine
'Use Oracle Export to do a backup of the schema.
objShell.Run "exp" & OracleLogonInfo & OracleExportParfileInfo & " file=" & OracleExportPathAndFileName
wscript.quit
#################################################################
A batch files creation is required to trigger the VB script and can be scheduled as a daily job in Windows Scheduler or a job automation process.
Please let me know if I am not clear...
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is from [forumtopics|http://www.forumtopics.com/busobj/viewtopic.php?t=112546&start=0&sid=68e58cff58f9eef5d39bdc6ebf085ab1] and not my own idea/ research.
I also haven't tried this. We don't use BIAR files for backup.
OK, under Business Objects\common\4.0\java\lib\ is biarengine.jar this uses a properties file such as:
This file exports the repository
exportBiarLocation=E:/BIAR/mycms.biar
action=exportXML
userName=Administrator
password=<password>
CMS=mycms:6400
authentication=secEnterprise
includeSecurity=true
exportDependencies=true
exportQuery= select * from ci_Infoobjects
This is named BIARExport.properties and placed in the above directory.
exportBiarLocation shows the file to be created, in this case in the E:\BIAR directory.
The Admin User and Password together with the name of the CMS should be entered appropriately.
The exportQuery:
select * from ci_Infoobjects
is a select of the entire repository.
This can be changed appropriately to select what you want.
You can set up a batch file to invoke biarengine.jar and if necessary move, rename, delete or copy the previous BIAR file.
It's in the Admin manual, I believe, I don't have a copy handy right now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do you mean to create BIAR file?
for XI R2 there is nothing like that , you can not create a command line script to generate a BIAR file,
but you can create a command like script to backup the FRS and the Database Schema, and this should be enough.
in XI 3.0 there is an option can let you export a BIAR file using command line using java SDK
find this please
https://boc.sdn.sap.com/node/18773
good luck
Amr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.