BusinessObjects Board

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 ( ), 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


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


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


Modify the file:

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


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


Platform: SAP BusinessObjects 4.0 SP3-5

Version: 1.0 (3.0 KB)

jdh2n (BOB member since 2006-11-13)

Moderator note:
Approved, and moved to BOB’s Downloads.

Marek Chladny :slovakia: (BOB member since 2003-11-27)

Hi Jonathan,

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

Thank you

izak004 :us: (BOB member since 2010-11-10)

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

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


cd “%BOPATH%\java\lib”

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

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


xcopy “%BACKUPPATH%\backups*” %NETWORKPATH% /y /d /e

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

jdh2n (BOB member since 2006-11-13)

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.

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

nscheaffer :us: (BOB member since 2012-04-26)

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.”

jdh2n (BOB member since 2006-11-13)

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.

@echo off

SET BOPATH=C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0
REM ***** SET NETWORKPATH=\\server\share\path *****
SET TDATE=%date:~-4,4%-%date:~3,2%-%date:~0,2%

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


cd "%BOPATH%\java\lib"

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


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:


Thanks for creating this very handy script!

ethan1701 :israel: (BOB member since 2004-05-05)

I want to modify the 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.


ethan1701 :israel: (BOB member since 2004-05-05)

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

jdh2n (BOB member since 2006-11-13)

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.


ethan1701 :israel: (BOB member since 2004-05-05)

Create a Batch File that contains code like the following. It will generate an 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 >
echo exportBiarLocation=X:/BOBJBIARBackup/backups/TEMP_EXPORT.biar >>
echo action=exportXML >>
echo userName=Administrator >>
echo password=xxxx >>
echo CMS=localhost:6400 >>
echo authentication=secEnterprise >>
echo exportDependencies=true >>

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

jdh2n (BOB member since 2006-11-13)

Looks great and simple enough. Thanks so much, I’ll be sure to implement this shortly!

ethan1701 :israel: (BOB member since 2004-05-05)

Could you just rename the thread “BusinessObjects BI4 .BIAR Backup Script” because for veterans like me, BusinessObjects 4.x has existed before

bernard timbal :fr: (BOB member since 2003-05-26)

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.


ankur4545 :us: (BOB member since 2009-11-28)

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?


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

REM *** get current date-time, from

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%'>>
echo exportQueriesTotal=^1>>
goto :eof

ethan1701 :israel: (BOB member since 2004-05-05)

Hi Ethan,

what do you mean invalid? is the extension getting messed up?
Or you get error when performing restore using the BIAR files?

If thats the case, please note its mentioned that you need to rename the files the original names before using them for the restore.


ankur4545 :us: (BOB member since 2009-11-28)

I meant that a BIAR was not being created, because the properties file was invalid, due to having an extra empty line on the end.

Either way, I tested creating an incremental backup, and have decided against it.
A full backup of my system is about 11GB, and one that only backs up objects modified yesterday weighed 1.3 GB. Not quite the lean backup I was hoping for.
I’ll keep backing up the whole system, and keeping the last 7 days of backups.


ethan1701 :israel: (BOB member since 2004-05-05)

After I create the .bat file to run the backup, as I do? simply just run the .bat on the server? or I have to put the .bat in a specific folder?

vander.barbosa (BOB member since 2016-04-22)

You can just upload the object to CMC in a folder of your choice.
Then you can set it as a recurring job and you should be all set!

ankur4545 :us: (BOB member since 2009-11-28)

for 4.2 SP2 change to this line as the directory for Java has changed


jfish (BOB member since 2009-06-16)