Sign in to follow this  
Followers 0
DavidLHudgins

SAP BusinessObjects 3.1 Import Wizard AutoBackup Script

When was the last time you actually "TESTED" your backup files and proved they worked?  

  1. 1. Backup? We don't need no stinking Backup!

    • Never but Im responsible for restoring them
      0
    • 0-3 months ago
      0
    • 3-6 months ago
      0
    • 6-12 months ago
      0
    • Over 12 months ago
      0
    • I don't know, IT is responsible for backing up and recovering.
      0

Please sign in or register to vote in this poll.

2 posts in this topic

I'll most likely put this in my blog, so any input would be greatly appreciated.

Automating Business Objects 3.1 Import Wizard - Non Command Line Version

Most people create backups using a silent command line option and settings file, however most people don't test the backup files or attempt a restore of the data until its too late.

The script commonly used in the command line option looks like this:

Filename: export.properties

action = exportXML

exportBiarLocation = complete.biar

userName = Administrator

password = password

authentication = secEnterprise

CMS = systemname:port

exportDependencies = true

includeSecurity = true

exportQueriesTotal = 3

exportQuery1 = select * from CI_INFOOBJECTS

exportQuery2 = select * from CI_SYSTEMOBJECTS

exportQuery3 = select * from CI_APPOBJECTS

However when you compare the file sizes on the complete.biar file against the same complete.biar file using the interface, you discover that the file sizes are significantly from the interface.

Commandline: 229,525 KB (complete.biar)

Interface: 529,743 KB (complete.biar)

Interface: 235,586 KB (complete1.biar)

The user interface auto created 2 files once the max filesize was reached. This never happened in the commandline version.

The commandline version wouldn't restore either using the commandline import or the user interface import.

The user interface option restored flawlessly using both options.

After researching the errors for several hours, it was the general opinion of the masses that the command line version would fail to restore due to the command line inability to disregard the temporary filestore.

So an alternate solution was needed to replace the commandline version, heres the script I used im my solution.

;Software: SAP/Business Objects 3.1 Server Import Wizard

;UserGuide: http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_bip_importwiz_en.pdf

;Purpose: Sap Import Wizard allows administrators to create backup of their existing environment or perform transfers between two environments.

; This application already has in place a silent mode that uses a settings.ini file to perform the backup

;

;Issue: During a recent disaster recovery test, we discovered that a BIAR file created using silent mode contained various errors that causes

; the Import Wizard restoration process to fail. The script was verified and correct according to SAP. Reran backup and restore fail again.

;

;Quickfix: Perform the non-silent Import Wizard backup. This user interface mode creates the correct BIAR file and allows for a successful restoration processes

;

;Solution: Create an AutoIT scripted exe file that replaces silent mode with a scripted user interface mode.

;_____________________________________________________________________________________________________________________________________________________________________

;

;Author: David Hudgins, Senior Systems Engineer

;Company: Consultancy By Kingfisher, Inc.

;Contact: david.hudgins@kingfisherinc.com (404) 531-4116

;Date: 04/16/2013

;Revision: 1.0

;_____________________________________________________________________________________________________________________________________________________________________

;

; Start of Import Wizard script

;

; Declare Variables

;

Global $S, $User, $Password, $Authentification, $DestCMS, $DestUser, $DestPass, $DestAuth, $DestType, $Today

; Set Source System Information and Logins Credentials

;

$S = "CMS_NAME:PORT"

$User = "Administrator"

$Password = "Password"

$Authentification = "Enterprise"

; Set Destination System Information and Logins Credentials

; NOT USED FOR THIS SCRIPT

$DestCMS = "CMS_NAME:PORT"

$DestUser = "Administrator"

$DestPass = "Password"

$DestAuth = "Enterprise"

; Set Destination Backup Type

;

$DestType = "Business Intelligence Archive Resource (BIAR) File"

; Set Destination Backup Filename

;

$Biar = @MON & @MDAY & @YEAR & "_" & @HOUR & @MIN & ".BIAR"

; Begin Automated Process

;

; Run the Import Wizard

Run("ImportWiz.exe")

; Initial Setup Screen

;

WinWaitActive("Import Wizard", "Welcome to the Import Wizard" )

WinActivate("Import Wizard", "Welcome to the Import Wizard" )

ControlClick("Import Wizard", "Welcome to the Import Wizard" , 12324)

; Select Source CMS

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlSetText("Import Wizard", "", 1003 , $S)

ControlSetText("Import Wizard", "", 1005 , $User)

ControlSetText("Import Wizard", "", 1006 , $Password)

ControlClick("Import Wizard" , "", 12324)

; Optional 4.0 Backup Override Logon Warning

;

;WinWaitActive("Logon Warning", "The version")

;WinActivate("Logon Warning", "The version")

;ControlClick("Logon Warning", "The version", 6)

; Select Destination Environment

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlCommand("Import Wizard","", 1154, "SelectString", 'Business Intelligence Archive Resource (BIAR) File')

ControlSetText("Import Wizard","", 1098, $Biar )

ControlClick("Import Wizard","", 12324)

; Select Objects to Import

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "",1010 )

ControlClick("Import Wizard","", 12324)

; Select Confirm

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard","", 12324)

; Select Users

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "" , 1010)

ControlClick("Import Wizard", "" , 1220)

ControlClick("Import Wizard","", 12324)

; Select Access Levels

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "" , 1010)

ControlClick("Import Wizard","", 12324)

; Select Categories

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "" , 1010)

ControlClick("Import Wizard", "" , 1048)

ControlClick("Import Wizard","", 12324)

; Select Folders

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "" , 1010)

ControlClick("Import Wizard", "" , 1048)

ControlClick("Import Wizard","", 12324)

; Select Applications

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "" , 1010)

ControlClick("Import Wizard", "" , 1048)

ControlClick("Import Wizard","", 12324)

; Select Import Options

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "" , 1116)

ControlClick("Import Wizard","", 12324)

; Select Repository Import Options

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "" , 1077)

ControlClick("Import Wizard","", 12324)

; Select Publications

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard","", 12324)

; Select Note on Backup

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard","", 12324)

; Select Remote Connections

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "" )

ControlClick("Import Wizard", "" , 1010)

ControlClick("Import Wizard","", 12324)

; Select Remote Connections

;

WinWaitActive("Import Wizard", "" )

WinActivate("Import Wizard", "Finish" )

; Starts the Process

;

ControlClick("Import Wizard","", 12325)

; View Detail Log

;

WinWaitActive("Import Progress", "" )

WinWaitActive("Import Progress", "View Detail Log" )

WinActivate("Import Progress", "" )

ControlClick("Import Progress", "", 1018 )

; Closes Import Wizard

;

;ControlClick("Import Progress", "", 1019 )

; END OF LINE

Share this post


Link to post
Share on other sites



Please use the autoit tag to post your code, in that way is much more readable.

Hi!


My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0