Skip to Content
Author's profile photo Former Member

Back Up Log Files for BO servers using java program objects

In this blog, I will be demonstrating a program object to automate the process of back up of the log files generated by BO servers and free the disk space used by logs in default BO logging directory. It helps to investigate root cause for server issues as the log files are organized efficiently


  1. BusinessObjects Enterprise System
  2. BusinessObjects Enterprise Java SDKs

Creation of a Java Program Object:

  • For creating a java program object, you need to write a java class which has to implement the interface IProgramBase.
  • Once you create the java file, you would then need to create a jar file for the java class by setting all the required jars in your classpath.
  • Below is a sample java file to take back up of log files in a BusinessObjects environment

import com.crystaldecisions.sdk.plugin.desktop.program.*;
import com.crystaldecisions.sdk.framework.*;
import com.crystaldecisions.sdk.occa.infostore.*;
import com.crystaldecisions.sdk.exception.*;
public class MoveLogFiles implements IProgramBase {
public void run(IEnterpriseSession enterprisesession,IInfoStore iStore,String str[]) throws SDKException
File file = new File(str[0]);
String[] myFiles;   
                myFiles = file.list();
                for (int i=0; i<myFiles.length; i++) {
                File myFile = new File(file, myFiles[i]);
File afile = new File(str[0] +"\\"+ myFile.getName());
  afile.renameTo(new File(str[1] + "\\" + myFile.getName())) ;
System.out.println(new File(str[1] + "\\" + myFile.getName()));

  • Copy the above code into a text file and save it as Please make sure that your java class name and file name should exactly be the same (case sensitive).
  • Compile the above java class by having all the jars required to run the file in the classpath. You can also use eclipse IDE to compile and create jar file. The list of jars can be found from the developers guide available at below links:
    • For BI 4.0:


    • For XI 3.1


  • Refer to the section ‘JAR files needed for deployment of Business Objects Software’ from the above guides to get the list of jar files.
  • You would specifically need the jar files listed under ‘BusinessObjects Enterprise Java SDK’
  • Once you have compiled the code, create a jar file for your compiled .class file.

Publishing the Java Program Object to the Enterprise System:

  1. In the CMC, go to Folders and create new folder “Objects” or navigate to an existing folder where you want to publish the program object
  2. Select the folder “Objects” and click on Manage | Add | Program File
  3. Choose as Program Type Java and add BackUpLogFiles.jar
  4. Right Click on ServerStatus within your Objects folder and choose Properties | Default Settings | Program Parameters
  5. Specify as “Class to run:” MoveLogFiles.
  6. In the Arguments section, pass the folllowing parameters:

               It takes two arguments as path for directories starting with the source directory (BO default logging dir path) followed by destination directory (Archive                directory). For example, “D:\BusinessObjects\Logging” “D:\Backup”

               Following two scenarios are applicable here:

      1. BO default logging directory is hosted on the server box where Program Job Server is running:

                       In this scenario you can specify the cache directory path in the usual format e.g. C:\Program Files (x86)\Business Objects\logging

                   b. BO Logging directory is hosted on a remote server or SAN Disk:

                        In this scenario you can specify the cache directory path in the UNC syntax for windows i.e. \\server\share\file_path

                         e.g. \\\C$\Program Files (x86)\Business Objects\logging

                       Note: The account on which BO services are running must have required access on the remote box in order to perform the read/write/delete operation

   7. Test “Run Now” and schedule the Program Object.

Upon successful execution of the program objects log files are moved from the logging directory to the back up directory.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Prithviraj Shekhawat
      Prithviraj Shekhawat

      Nice blog.