BackUp Utility User Guide

Contents

Introduction to using the Backup Utiltiy

Backup Utility is lightweight backup software that is ideal for making simple backups of your desktop or laptop to a server or to an external disc drive. It can perform either a full backup or an incremental backup where only the files that have changed since last backup are backed up. The backup files are directly copied to the backup destination folder so they can easily be manually restored when required.

Backup Utility makes use of a Backup Script file that is edited to define which folders are backed up, where they are backed up to and whether to do a full or incremental backup. It also produces a log file in HTML format which can be reviewed for details of the backup routine or for any error messages.

Backup Utility is a command line application and so can be easily integrated with third party scheduling tools such as the Windows Scheduler to enable a scheduled backup routine.

Defining a Backup Script

Within the 'conf' folder you will find a script.xml file. You edit this file to define your backup job, basically which folders you want to backup and where they are backed up to. In the backup script you define a series of backup events where a backup event is the backup of a single folder (and its subfolders) to a destination folder. You can control the backup process for each event using options and rules.

The script is defined in XML format and its structure is defined by the script.dtd file in the same folder. This is an example script,

  <backup-script>
    <event recurse="on" mirror-delete="on" active="off">
      <source>C:/Program Files/</source>
      <destination>H:/Program Files/</destination>
      <rule>changed</rule>
    </event>
  </backup-script>

Backup Event Structure

The outermost tag is backup-script within this tag you define one or more backup events between event tags. You will notice in the above example the event tag that contains source, destination and rule tags. These tags must be present in between all event tags.

Backup Options

The event tag also requires three attributes:

These attributes all take values of either 'on', 'off', 'true', 'false', 'yes', 'no'.

Backup Rules

You can control exactly how a backup job proceeds for example, whether a full backup or incremental, using backup rules. The rule tag within an event defines the rule and it takes one of the following values.

Backup Script Log Files

Backup Utility uses log4j to create an HTML format log of the backup process. The logging process can be configured using the log4j.properties file within the conf folder. This section describes options availble to configure the logging and further documentation is available at the log4j website.

If we look at the first line of the log4j.properties file we find,

log4j.rootLogger=info, F, C

This is saying that we will use to log mechanisms or appenders 'F' and 'C' for send log output to a file and to the screen (console). The 'info' keyword is used to indicate the level of log detail, changing this to 'debug' will produce more detail.

The next section defines properties for logging to the screen,

log4j.appender.C=org.apache.log4j.ConsoleAppender
log4j.appender.C.layout=org.apache.log4j.SimpleLayout

This basically says that the appender C is a console appender and will use the SimpleLayout format.

The last section defines the appender F,

log4j.appender.F=org.apache.log4j.FileAppender
log4j.appender.F.file=./log/backup_log.html
log4j.appender.F.layout=org.apache.log4j.HTMLLayout

Here we define appender F as a file appender and use HTML layout. The important line here is the 2nd line where we define the log file that is generated. You can change this to anything you like and the path can either relative to the bin folder (where the application runs) or to a root folder of your system.

Running Backup Utility

The Backup Utility is started by running launch.bat batch file. You can pass a parameter to this file which is the path to a Backup Script file. If you dont pass a parameter then the script.xml file in the conf folder is used.

The most likely cause of Backup Script failing to run that the JVM can't be located on your systemand on running launch.bat you will get an error message "java is not recognised as an internal or external command...". To resolve this locate the JVM on your system and update your PATH system environment variable to include the path to your JVM.

To test if your JVM is correctly installed open a command prompt and enter java -version. This should display version information about your installed JVM. If this does not work update your system's PATH environment variable to include the path to your JVM.

Scheduling Backup Utility

Backup Utility ndoes not come with an inbuilt scheduler but since it is launched from the command line it can be very easily launched with a 3rd party scheduler. Most operating systems provide a simple scheduling tool. Use the scheduling tool to run the file 'launch.bat' and where possible set the working directory to the same folder as launch.bat's folder.