5 1 0:SEP sesam Interfaces

From SEPsesam


Welcome to the latest SEP sesam documentation version 5.1.0 Apollon. For previous documentation version(s), check documentation archive.


Overview


SEP sesam interfaces are configurable programs designed for system administrators to customize backup and recovery processes, and SEP sesam operation, to their requirements. These interfaces can be modifed and programmed using any text editor. Before they can be used, they have to be activated, and then they are triggered by specific system events.

These interfaces are divided into client-side and server-side categories. The client-side interfaces define actions to customize backup or restore operations on the client, while server-side interfaces determine actions performed on the server based on system events, such as the outcome of backup/restore jobs.

Pre/post interfaces are client-side, running exclusively on the selected client. They enable performing additional actions on the client before or after backup and restore. Examples of such actions include exporting a database, restarting a database, and sending emails.

On the server-side, notify and alarm interfaces are designed for issuing warnings and notifications on errors, the status of completed jobs, and other actions. Futhermore, disaster interface is intended to enable and support the disaster recovery of the SEP Sesam Server.

Available interfaces

PRE interface (sbc_pre)

Pre-script is executed on the SEP sesam Client (note that SEP sesam Server is also a backup client). It can be configured to perform special actions before and during the backup or restore. Pre-interface can be used to create commands that will stop or start the selected programs, for example, it may be used to stop the database before it is backed up. It can be used to send messages and quickly notify the administrator of backup start or failure to initialize.

Pre interface is available separately for backup and for restore. To use a pre interface, you have to activate it and create your own commands. By default, the pre-script extracts necessary parameters from the provided arguments, including source, tape server, task, drive number, backup type, and others. Additionally, it includes commands to log the start and end of the script. To customize the script, insert your specific code after the comment marking the "Specific Actions Before Backup" section.

For details, see Using Pre and Post Scripts.

POST interface (sbc_post)

The post interface is used to perform actions after the backup, such as checking the backup status, sending notifications, or executing other relevant tasks. Similarly to the pre-script, the post-script is executed on the SEP sesam Client after the backup activity is completed. The post interface is available for backup and restore. To use it, it first needs to be activated.

The default post-script begins by printing the call arguments, displaying details such as source, tape server, task, drive number, backup type, and more. It includes parameters like backup status, backup message, saveset size, and start time. The post-script also logs the start and end of the script. Users can customize the script by inserting specific code after the comment marking the "Specific Actions After Backup" section. In case of any errors during the execution of the post-script, function error_post() is defined to handle and report errors appropriately.

For details, see Using Pre and Post Scripts.

Alarm interface (sm_alarm)

The Alarm interface operates on the SEP sesam Server and is intended to notify the system administrator about various errors that may occur in the SEP sesam modules.

During regular operation of the SEP sesam system, once SEP sesam environment is set up and configured, no special administration or user intervention is required, except for the restore process. In case of functional errors, for example failure of a specific backup, the alarm interface is activated, sending email notifications to specified email accounts. The alarm interface enables configuring different lists of recipients for different types of errors.

If a license violation occurs, and the alarm interface is activated, an email containing information about the license violation is dispatched to the email account named "sesam". License violations occur when certain conditions set in the license are exceeded, including maximum volume size, the maximum number of configured clients, and unlicensed backup task types (e.g., BSR). On the 16th day after issuing the violation alarm, SEP sesam backups are temporarily halted until the issue is resolved, while restores remain available. To prevent license violations, review your license in SEP sesam Web UI menu bar -> Help icon -> License information. For more detailed information, refer to License administration.

By default, the alarm script receives input parameters, such as the triggering module and a message, to identify the type of operation or error that has occurred in the SEP sesam system. The script logs these input arguments to a log file and triggers specific actions based on the module and message provided. These actions include sending emails for various failed SEP sesam operations, such as initializing media, accessing storage volumes, backup, restore, migration, or copying savesets during migration or when a datastore is full. For any unhandled module type, the script sends a generic email.

The script checks the system's registry to locate the SEP sesam configuration files, executes the SEP sesam profile, and defines two mail-sending functions. Function send_mail is used to send general notifications with the provided type, message, and relevant files attached. The second function send_backup_mail specifically handles backup-related notifications, appending an "ALARM" prefix to indicate a failure and attaching the corresponding backup status file.

Notify interface (sm_notify)

The Notify interface is executed on the SEP sesam Server. It can be used for reporting successfully finished events, such as backup, restore, migration, media initialization, and start/finish of a NEWDAY event.

It can also define several important functions, including those responsible for mailing, logging, and printing. The script also includes functions for ejecting tapes from drives, loading tapes back into slots, and reporting backup states for specific time frames and locations. The Notify interface is a versatile tool designed to keep administrators informed about the status and performance of the SEP sesam system.

By default, the notify script receives input parameters, including the triggering module and a message, to identify the type of operation or event in the SEP sesam system. The script logs these input arguments and triggers various actions based on the specified module and message. These actions include sending emails for a range of SEP sesam operations, such as initializing media, accessing storage volumes, performing backups, restores, and migrations, copying individual savesets during migration, executing command events, and starting or stopping the newday event. For any unhandled module type, the script sends a generic email.

Disaster interface (sm_disaster)

The Disaster interface is designed to enable and support the disaster recovery of the SEP sesam Server. It is activated every time self-backup of the SEP sesam Server (backup task SESAM_BACKUP) is performed. It sends an email with instructions and all required data to perform disaster recovery procedure (media label, backup source, barcode or datastore path, and the restore command), and an attachment containing the SEP sesam bootstrap database.

When you activate the disaster interface, you need to configure "sesam" mail account with a valid SMTP email address and SMTP server settings for email communication, and SESAM_BACKUP task, which triggers the disaster interface.

To ensure the correct execution of the disaster script, it should run with administrator privileges. The script requires access to specific system settings, registry entries, and rights to execute critical operations related to disaster recovery. Additionally, the script relies on specific SEP sesam paths and configurations. Verify that the SEP sesam installation is properly configured, and cross-check the paths specified in the Windows Registry.

For details, see SEP sesam Server Disaster Recovery.

Configuring interfaces

To use an interface, you have to first activate it, and then customize the script.

The server-side interfaces (Notify, Alarm and Disaster) send automated notifications by email. This functionality requires an email account named "sesam" (all lowercase).

  1. To activate the interface in GUI, in the menu bar click Configuration -> Interfaces, and then select the required interface.
  2. For pre or post interfaces, select the backup or restore interface type, and the associated client.
  3. The interface script window opens, where you can modify the script and configure custom actions. After making the necessary changes, click Save to activate the interface. The interface script is saved to the <SESAM_ROOT>/bin/sesam directory.

Alternatively, you can activate the interfaces by using the templates that are available in the SEP sesam directory <SESAM_ROOT>/skel/templates. To activate an interface, copy its corresponding template file to the directory <SESAM_ROOT>/bin/sesam. You can modify the interface scripts using any text editor.

Note
When customizing interface scripts, do not use commands requiring user input, such as confirmations. User-interactive commands may disrupt backups, particularly during nightly operations.

Logs for interfaces are available in the default SEP sesam directory for logs <SESAM_VAR> (/var/opt/sesam/var). In Web UI, you can access the logs by clicking System Logs in the navigation menu (available in Advanced view). Logs can be selected in the drop-down menu in the content pane. For more information see About Logging.


See also

Configuring Email Accounts - About Logging - Using Pre and Post Scripts - SEP sesam Server Disaster Recovery

Copyright © SEP AG 1999-2024. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.