Source:Using Pre and Post Scripts

From SEPsesam
Revision as of 17:20, 10 January 2018 by Sta (talk | contribs) (In progress.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.

Template:Copyright SEP AG en

Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3 to 4.4.3 Tigon V2. For previous documentation version(s), check Documentation archive.


Overview

SEP sesam enables system administrators to perform additional actions before and/or after a backup or restore by using pre or post scripts.

Pre backup scripts are executed before backup jobs starts to perform specific operation. Typically, they are used to create commands that will stop or start the selected programs, for example, to stop a database or an antivirus service before the backup. Similarly, pre restore scripts are executed before restore starts.

Post backup scripts are executed when the backup session stops to perform specific tasks, such as starting a database or shutting down a computer after the backup. Similarly, post restore scripts are executed after the restore is done, for example, to start a database.

Pre- and post scripts are represented as one of SEP sesam interfaces. These are configurable programs which can be programmed by using any text editor. Pre and post scripts are not provided by SEP sesam; you must create your own scripts to perform the desired actions.

Unlike other SEP sesam interfaces, the pre/post interfaces relate to a specific client only; they are created for each client individually and are only executed on the selected client.

Information sign.png Note
Configuring pre and/or post scripts is optional. The pre/post interface might affect backup or restore execution; when creating a script, have in mind that any pre/post script should not take a long time to complete as it can delay a backup or restore.

To use the pre/post script, you have to activate the relevant interface first and then create your own script.

Configuring pre and post scripts

SEP sesam provides several interface templates. They are located in the SEP sesam directory <SESAM_ROOT>/skel/templates. You can activate them automatically via GUI (recommended) or manually by copying them.

Activating interfaces via SEP sesam GUI

  1. From Configuration -> Interfaces, select the relevant interface type (Pre or Post) that you want to activate.
  2. Configuration interfaces pre.png
  3. A new window with the interface script opens. Click Save to activate the interface.
  4. Pre interface.png

Upon saving the template the script is read and copied to the <SESAM_ROOT>/bin/sesam.

Activating interfaces manually

Alternatively, you can activate the interfaces by copying the existing templates from the SEP sesam directory <SESAM_ROOT>/skel/templates under the names:

sbc_pre
sbc_post

to the directory <SESAM_ROOT>/bin/sesam.

See also

Interfaces