BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Want to sponsor BOB? 
Want to sponsor BOB? (Opens a new window)  

General Notice: No events within the next 45 days.

BusinessObjects 4.0 .BIAR Backup Script
1 members found this topic helpful
Goto page 1, 2  Next
 
Search this topic... | Search BOB's Downloads... | Search Box
Register or Login to Post    Forum Index -> BOB's Downloads  Previous TopicPrint TopicNext Topic
Author Message
jdh2n
Senior Member
Senior Member



Joined: 13 Nov 2006

Posts: 89



PostPosted: Fri Jan 25, 2013 8:48 am 
Post subject: BusinessObjects 4.0 .BIAR Backup Script

The following application can be run on any SAP BusinessObjects 4.0 server to generate a .BIAR file (backup) of the repository. Using the tips from the following article ( http://wp.me/p2868w-8f ), you can then use the UMT, LCM or BIARENGINE.JAR to restore the file.

Author: Jonathan Haun Twitter:@jdh2n

Author notes:

modify the BOE40Backup.bat file and set the following parameters


BOPATH - Path of the SAP Business Objects Installation
See example below:

SET BOPATH=C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0

BACKUPPATH - Root Path to where the backup files are stored. Files will be saved to the "backup" directory within the path

SET BACKUPPATH=C:\BOBJBIARBackup

NETWORKPATH - The UNC path to the network location where the files will be copied. Keep blank if none is required.
SET NETWORKPATH=\\server\share\path

ENVNAME - The user defined name that is added to all backup files. Nice to have if there are multiple environments
SET ENVNAME=development40

BACKUPDAYS - The number of days that the backup files are retained on the local drive

SET BACKUPDAYS=14

DRIVELETTER - The letter of the disk drive that contains this applicaiton

SET DRIVELETTER=C


Modify the options.properties file:

exportBiarLocation - The location where the .BIAR file is created. Must match the %BACKUPPATH%\backup path in the BOE40Backup.bat file.

exportBiarLocation=C:/BOBJBIARBackup/backups/TEMP_EXPORT.biar

See the XI 3.1 SP3 Admin Guide for further details on the BIARENGINE.JAR options.properties file.

Discussion: http://wp.me/p2868w-8f

Platform: SAP BusinessObjects 4.0 SP3-5

Version: 1.0



BOBJBIARBackup.zip
 Description:
BusinessObjects 4.0 BIAR Backup Script

Download
 Filename:  BOBJBIARBackup.zip
 Filesize:  3.05 KB
 Downloaded:  3432 Time(s)


_________________
Jonathan -

BOCP - Crystal Reports
BOCP - BOE
HANA

Protiviti:
http://www.protiviti.com

Latest Blog Posts
• 2019-07-24 SAP BusinessObjects 4.2 SP6+ ONE Installer
• 2019-03-06 My advice to help you reduce your costs when implementing SAP HANA based solutions.
• 2019-02-12 SAP HANA XS Advanced – DNS Alias
Back to top
Marek Chladny
Forum Advocate
Forum Advocate



Joined: 27 Nov 2003

Posts: 19291
Location: Bratislava


flag
PostPosted: Fri Jan 25, 2013 9:09 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

Moderator note:
Approved, and moved to BOB's Downloads.
Back to top
izak004
Principal Member
Principal Member



Joined: 10 Nov 2010

Posts: 275
Location: New York


flag
PostPosted: Mon Mar 31, 2014 3:02 pm 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

Hi Jonathan,

Do you by chance happen to have the script for creating backup biar files in XIR3.1?

Thank you
Back to top
jdh2n
Senior Member
Senior Member



Joined: 13 Nov 2006

Posts: 89



PostPosted: Thu May 01, 2014 11:17 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

There are only a few changes required. You need to update a few of the paths. See the example below generated from a BOE31 SP7 environment.

-->Start Script

@echo off

SET BOPATH=X:\Program Files (x86)\Business Objects\common\4.0
SET BACKUPPATH=X:\BOBJBIARBackup
SET NETWORKPATH=
SET ENVNAME=BOE31XX
SET BACKUPDAYS=14
SET DRIVELETTER=X

REM *** Change the Drive Letter Below to match your envirnment ****
@echo on

%DRIVELETTER%:

cd "%BOPATH%\java\lib"

"X:\Program Files (x86)\Business Objects\sapjvm\bin\Java.exe" -jar biarengine.jar "%BACKUPPATH%\options.properties"

cd "%BACKUPPATH%\backups"



del %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%*.biar
ren TEMP_EXPORT.biar %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%.biar
ren TEMP_EXPORT1.biar %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%1.biar
ren TEMP_EXPORT2.biar %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%2.biar
ren TEMP_EXPORT3.biar %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%3.biar
ren TEMP_EXPORT4.biar %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%4.biar
ren TEMP_EXPORT5.biar %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%5.biar
ren TEMP_EXPORT6.biar %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%6.biar
ren TEMP_EXPORT7.biar %date:~-4,4%%date:~4,2%%date:~-7,2%-%ENVNAME%7.biar

Forfiles /P "%BACKUPPATH%\backups" /S /M *.* /D -%BACKUPDAYS% /C "cmd /c del /q @path"
Forfiles /P "%NETWORKPATH%" /S /M *.* /D -%BACKUPDAYS% /C "cmd /c del /q @path"

cd "%BACKUPPATH%\"

xcopy "%BACKUPPATH%\backups\*" %NETWORKPATH% /y /d /e

REM ****** Remove Pause Option when scheduling *****

_________________
Jonathan -

BOCP - Crystal Reports
BOCP - BOE
HANA

Protiviti:
http://www.protiviti.com

Latest Blog Posts
• 2019-07-24 SAP BusinessObjects 4.2 SP6+ ONE Installer
• 2019-03-06 My advice to help you reduce your costs when implementing SAP HANA based solutions.
• 2019-02-12 SAP HANA XS Advanced – DNS Alias
Back to top
nscheaffer
Forum Member
Forum Member



Joined: 26 Apr 2012
ASUG Icon
Posts: 17
Location: South Dakota


flag
PostPosted: Tue Jun 03, 2014 5:24 pm 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

First off we are on 4.1 SP01 Patch 6.

I have this set up and mostly working, but I do have a few questions.

1. If the results get split into multiple BIAR files due to the 512 MB limit per file how do I know which one to open to get the report I am looking for? Is it just trial and error? Or does it not matter and the UMT just figures it out behind the scenes?

2. If I am understanding things correctly, there is a step in the batch file to rename the resulting BIAR file(s). If there is just one BIAR file all is well. However, if the results are split across multiple BIAR files I get an error.

Image link

It seems there is some sort of internal reference that I have broken by renaming the files.

_________________
Thanks,

Noel
Back to top
jdh2n
Senior Member
Senior Member



Joined: 13 Nov 2006

Posts: 89



PostPosted: Wed Jun 04, 2014 2:13 pm 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

This is a response I posed on my blog site:

"The short answer is to make sure your group of.BIAR files all have their original names. Each .BIAR creates a chain to the next BIAR when restoring files. Only one file has the .xml catalog file. Therefore you need all of the files to restore. You can then import the first file and the UMT should find the remaining files as needed. In my example script the files are named TEMP_EXPORT.BIAR . When there are 3 512GB files (for example), you would have TEMP_EXPORT.BIAR, TEMP_EXPORT1.BIAR and TEMP_EXPORT2.BIAR. Using my script, this is the original name of the files. Before importing them with UMT, you have to make sure they have their original names. I have a different script that I run for larger environments. In that script I rename the TEMP_EXPORT*.BIAR files as needed to prevent subsequent backup jobs from overriding the files. However, before I restore content using the UMT, I have to rename them back to their original names."

_________________
Jonathan -

BOCP - Crystal Reports
BOCP - BOE
HANA

Protiviti:
http://www.protiviti.com

Latest Blog Posts
• 2019-07-24 SAP BusinessObjects 4.2 SP6+ ONE Installer
• 2019-03-06 My advice to help you reduce your costs when implementing SAP HANA based solutions.
• 2019-02-12 SAP HANA XS Advanced – DNS Alias
Back to top
ethan1701
Principal Member
Principal Member



Joined: 05 May 2004
ASUG Icon
Posts: 334
Location: Israel


flag
PostPosted: Thu Oct 02, 2014 6:20 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

I modified the script a little bit:
Since it will create several BIAR files, each day the files will be put in their own directory, which will be named e.g 2014-10-02_BOEnv
This change required nominally changing the code that deletes old files.

I create a variable that adds up the total size of the files created, and I use an external library to notify me via SMS. in the code below, I left the size calculation, not the notification part of the code.

I'm using this in a 4.1 environment.

Code:

@echo off

SET BOPATH=C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0
SET BACKUPPATH=D:\BOBJBIARBackup\BOBJBIARBackup
REM ***** SET NETWORKPATH=\\server\share\path *****
SET NETWORKPATH=
SET ENVNAME=boprod1
SET BACKUPDAYS=7
SET DRIVELETTER=C
SET BACKUPDRIVELETTER=D
SET TDATE=%date:~-4,4%-%date:~3,2%-%date:~0,2%

REM *** Change the Drive Letter Below to match your envirnment ****
@echo on

%DRIVELETTER%:

cd "%BOPATH%\java\lib"

"%BOPATH%\win64_x64\sapjvm\bin\Java.exe" -jar biarengine.jar "%BACKUPPATH%\options.properties"

%BACKUPDRIVELETTER%:

cd "%BACKUPPATH%\backups\temp"

set /a size = 0
set "filename=*.biar"
for %%A in (%filename%) do set /a size += %%~zA / 1048576

echo file size is %size% MB

cd ..

ren temp %TDATE%_%ENVNAME%

mkdir temp

FORFILES /P "%BACKUPPATH%\backups" /S /D -%BACKUPDAYS% /C "cmd /c IF @isdir == TRUE rd /S /Q @path"



The addition of another directory level required also modifying the properties file:
Code:
exportBiarLocation=D:/BOBJBIARBackup/BOBJBIARBackup/backups/temp/EXPORT.biar

Thanks for creating this very handy script!
-Ethan[/code]

_________________
BusinessObjects Enterprise XI 4.1 SP6
Windows 2008
SQL Server 2014
Tomcat7
Back to top
ethan1701
Principal Member
Principal Member



Joined: 05 May 2004
ASUG Icon
Posts: 334
Location: Israel


flag
PostPosted: Mon Oct 20, 2014 5:26 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

I want to modify the options.properties file so that the exportquery will only include reports who's SI_UPDATE_TS is in the past two days. Is there any way of using a dynamic date, such as getdate()?
I tried it in the query builder, and not only did it not work, but it made the entire system hang.

Thanks!
-Ethan

_________________
BusinessObjects Enterprise XI 4.1 SP6
Windows 2008
SQL Server 2014
Tomcat7
Back to top
jdh2n
Senior Member
Senior Member



Joined: 13 Nov 2006

Posts: 89



PostPosted: Tue Mar 03, 2015 1:14 pm 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

Create a .BAT script that pipes out the options.properties file. In your batch script you can dynamically generate the date and use it in a filter.
_________________
Jonathan -

BOCP - Crystal Reports
BOCP - BOE
HANA

Protiviti:
http://www.protiviti.com

Latest Blog Posts
• 2019-07-24 SAP BusinessObjects 4.2 SP6+ ONE Installer
• 2019-03-06 My advice to help you reduce your costs when implementing SAP HANA based solutions.
• 2019-02-12 SAP HANA XS Advanced – DNS Alias
Back to top
ethan1701
Principal Member
Principal Member



Joined: 05 May 2004
ASUG Icon
Posts: 334
Location: Israel


flag
PostPosted: Wed Mar 04, 2015 10:23 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

Do you think you could get me started by writing a skeleton of such a script? I have no idea where to start, but I could probably build up on a good foundation.

Thanks!

_________________
BusinessObjects Enterprise XI 4.1 SP6
Windows 2008
SQL Server 2014
Tomcat7
Back to top
jdh2n
Senior Member
Senior Member



Joined: 13 Nov 2006

Posts: 89



PostPosted: Wed Mar 04, 2015 10:54 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

Create a Batch File that contains code like the following. It will generate an options.properties file that contains a dynamicaly generated date. The SQL is not 100% correct but I don't have time to look all the correct CMS SQL.

echo # Some Comments > options.properties
echo exportBiarLocation=X:/BOBJBIARBackup/backups/TEMP_EXPORT.biar >> options.properties
echo action=exportXML >> options.properties
echo userName=Administrator >> options.properties
echo password=xxxx >> options.properties
echo CMS=localhost:6400 >> options.properties
echo authentication=secEnterprise >> options.properties
echo exportDependencies=true >> options.properties

echo exportQuery1=SELECT TOP 5000 * FROM CI_INFOOBJECTS WHERE SI_UPDATE_TS ^>= '%date:~-7,2%^/%date:~4,2%^/%date:~-4,4%' >> options.properties
echo exportQueriesTotal=1 >> options.properties

_________________
Jonathan -

BOCP - Crystal Reports
BOCP - BOE
HANA

Protiviti:
http://www.protiviti.com

Latest Blog Posts
• 2019-07-24 SAP BusinessObjects 4.2 SP6+ ONE Installer
• 2019-03-06 My advice to help you reduce your costs when implementing SAP HANA based solutions.
• 2019-02-12 SAP HANA XS Advanced – DNS Alias
Back to top
ethan1701
Principal Member
Principal Member



Joined: 05 May 2004
ASUG Icon
Posts: 334
Location: Israel


flag
PostPosted: Wed Mar 04, 2015 11:21 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

Looks great and simple enough. Thanks so much, I'll be sure to implement this shortly!
_________________
BusinessObjects Enterprise XI 4.1 SP6
Windows 2008
SQL Server 2014
Tomcat7
Back to top
bernard timbal
Forum Addict
Forum Addict



Joined: 26 May 2003

Posts: 3909
Location: Paris - FRANCE


flag
PostPosted: Wed Mar 04, 2015 11:35 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

Could you just rename the thread "BusinessObjects BI4 .BIAR Backup Script" because for veterans like me, BusinessObjects 4.x has existed before
_________________
Bernard TIMBAL DUCLAUX de MARTIN
BusinessObjects Platform Certified Consultant
Image link
(Co)author of 2 books about SAP BusinessObjects XI3.x and BI4.x Administration
Back to top
ankur4545
Forum Member
Forum Member



Joined: 28 Nov 2009

Posts: 8


flag
PostPosted: Thu Mar 05, 2015 7:53 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

Hi All,

Is there any way to mask the password?
Or may be enter at runtime, as an argument?
That could help when using the script as a program object and run within BO.

Regards,
Ankur
Back to top
ethan1701
Principal Member
Principal Member



Joined: 05 May 2004
ASUG Icon
Posts: 334
Location: Israel


flag
PostPosted: Wed Mar 18, 2015 11:07 am 
Post subject: Re: BusinessObjects 4.0 .BIAR Backup Script

jdh2n, the script you offered is adding an extra line at the end of the properties file that it's creating, which is making the file invalid.
I don't know what's causing that.
Do you think you could help?

Thanks!

Code:
echo exportBiarLocation=X:/Daily/temp/EXPORT.biar> options.properties
echo action=exportXML>> options.properties
echo userName=Administrator>> options.properties
echo password=*****>> options.properties
echo CMS=localhost:6400>> options.properties
echo authentication=secEnterprise>> options.properties
echo exportDependencies=true>> options.properties

REM *** get current date-time, from http://stackoverflow.com/questions/203090/how-to-get-current-datetime-on-windows-command-line-in-a-

suitable-format-for-us
for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2%

echo exportQuery1=SELECT TOP 5000 * FROM CI_INFOOBJECTS WHERE SI_UPDATE_TS ^>= '%ldt%'>> options.properties
echo exportQueriesTotal=^1>> options.properties
goto :eof

_________________
BusinessObjects Enterprise XI 4.1 SP6
Windows 2008
SQL Server 2014
Tomcat7
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> BOB's Downloads  Previous TopicPrint TopicNext Topic
Page 1 of 2 All times are GMT - 5 Hours
Goto page 1, 2  Next
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.1012 seconds using 19 queries. (SQL 0.0036 Parse 0.0659 Other 0.0317)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo