Creating pre & post backup programs, Incremental/differential backups, Incremental backup examples – Storix Software SBAdmin TSM Edition Users Guide User Manual

Page 37: Creating pre and post, Backup programs

Advertising
background image

Storix System Backup Administrator

37

Version 8.2 TSM Edition User Guide

Creating Pre & Post Backup Programs

A customized program may perform any function on the system since it is run under root user authority. Any
arguments or flags may be provided to the command. The same script may be called with arguments that
tell the script how to proceed. For example:

mypreprogram –kill

may be used to log off users and

mypreprogram –warn

may warn users of the backup only, or

mypreprogram –kill 60

may warn users, then log them off after 20 seconds, etc.

In many cases, it is desirable for the program to have certain information about the backup job. The
program may want to display or save information about the backup job in another application or file, or a
post-backup program may need to respond differently depending on whether the backup was successful or
not. Every program will have access to the following environment variables:

STX_CLIENT

The name of the client

STX_SERVER

The name of the TSM server

STX_DEVICE

The name of the device on the server (API if written to TSM server)

STX_JOBID

The Job ID

STX_BACKUPID

The Backup ID

STX_EXITCODE

The exit code of the backup command or job

STX_SNAPLVNAME

The logical volume/filesytem for which a snapshot is created.

STX_SNAPFSNAME

The filesystem name (mount point) of the snapshot

This will show a dash "-" if the snapshot is not a filesystem

The

STX_EXITCODE variable is only used in client post-backup/job programs. This indicates the success

or failure of the backup.

The software is installed with sample script programs that may be used for any client or server pre-backup,
post-backup or pre/post snapshot program. The programs are called “

prepost.sample” and

"

prepostsnap.sample" and will simply display the values of all of the above variables when the backup job

is run. You may edit or view the contents of this script file (contained in the DATADIR

/custom directory),

which contains additional details on the use of this option.

Incremental/Differential Backups

An incremental backup is on in which the only data to be included in the backup is that which has changed
since the prior incremental backup level. An incremental backup level can be from 0 to 9, where 0 is a “full
incremental” backup from which all other levels are based. Levels 1 through 9 indicate that only data that has
changed since the last prior-level backup should be included.

Differential backups are also incremental backups, except that backups include a cumulative list of files that
have changed since a certain time. This is achieved by running the same incremental level backup repeatedly,
backing up the same files that changed since the last prior-level (or level 0) backup, along with any additional
files that have changed since the last time the same incremental level backup was run. The result is that the
backup gets continually larger each time it is run, until a prior level (or level 0) backup is run again.

Raw devices such as logical volumes (AIX) and other partitions (slices or ZFS volumes on Solaris, meta-disks
on Solaris & Linux, etc) that do NOT contain mounted filesystems will always be backed up in their entirety if
they have been written to since the last backup of a prior level. This assumes that you selected to “

Include as

raw data” this information in the backup profile. If included, we assume in the examples below these raw
devices will be included with the backups as well as the “files”.

Incremental Backup Examples

1. Consider the following backup schedule:

Monday

Level 0

Tuesday Level

1

Advertising