Follow-up Events

From SEPsesam
Jump to: navigation, search
Other languages:
Deutsch • ‎English

Copyright © SEP AG 1999-2018. 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.

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


Overview

As of SEP sesam version ≥ 4.4.3, you can configure follow-up events that are triggered on the SEP sesam Server once the initial event is completed. You can set up migration, saveset verify and other actions to be triggered immediately after backup or other event is completed.

Key features

Follow-up events allow you to start actions based on events happening on the backup server.

The following event chains can be combined:

  • Start migration after the backup or task group is successfully completed.
  • Start single backup task or task group after the backup, task group or migration is successfully completed.
  • Start saveset verify after the backup or task group is successfully completed.

Activating follow-up events

To activate the follow-up events, enter the following commands in the shell/cmd.

On Windows:

c:\program files\sepsesam\var\ini\sm_prof.bat
sm_glbv w gv_use_follow_up 1
sm_db "update defaults set value='1' where key ='enable_gui_follow_up'"

On Linux:

source /var/opt/sesam/var/ini/sesam2000.profile
sm_glbv w gv_use_follow_up 1
sm_db "update defaults set value='1' where key ='enable_gui_follow_up'"

Event-based actions are logged within:

SESAM_INSTALL_DIR/var/log/lgc/sm_event_<date>.log
Information sign.png Note
If you need troubleshooting assistance, send this log file with a description of your issue to SEP sesam support.

Configuring follow-up events

A follow-up event can be configured in the backup event properties: Main Selection -> Scheduling -> Schedules -> New backup event. For details, see Creating a backup event.

In the Follow up field you can configure events that are started on the SEP sesam Server once the initial event is completed.

Follow up events.jpg

Information sign.png Note
A follow-up event is always configured for the schedule that should trigger the event.

Testing events on the command line

Backup events can be tested on the command line before configuration. As initial start of a backup the command line tool sm_cmd is used.

The notation of the command has a special syntax:

sm_cmd <cmd_command> -@ "<event_definition>"

The following example shows an sm_cmd command which then automatically starts a follow-up event to back up a task group:

sm_cmd backup -m MEDIAPOOL -j TEST_BACKUP -@ "sm_event backup task SESAM_BACKUP - -m MEDIAPOOL -"

See SEP sesam Command Line Interface for details.

Follow-up examples

In the following examples the elements within the angle brackets < > indicate that the enclosed element is mandatory and must be appropriately replaced by parameter or actual name. Do not type the angle brackets in the command line. Every follow-up command also requires the ending hyphen -. All specified tasks and migration tasks have to be configured in the GUI before the follow-up event is started. For example, first you configure a migration task and then you set up the event migrate saveset after the backup.

Verify saveset after the backup

Information sign.png Note
Verifying savesets is currently only available for Path task type.

To verify the backup, use the following command:

sm_event verify saveset -

After the backup is finished, a restore is started and data is being verified. No data is written to the target system. To view the status of your verification job, go to the Main selection -> Job state -> Restore and check the verification status.

Migrate or replicate saveset after the backup

First, create a migration task or a replication task. Once the required task is created, you can set it up as a follow-up event after the backup has completed.

The following command will start the respective migration after each completed backup task:

sm_event migrate saveset <migration_task> -

Replace <migration_task> with the actual name of the migration (or replication) task, as it is displayed in Tasks -> Migration Tasks (or alternatively in Tasks -> Si3 replication).

SEP Tip.png Tip
As of version 4.4.3 Grolar, you can use Migration Task option in task event properties to chose a follow up migration task.

Migrate savesets after all backups in the group completed

First, create a migration task and then set it up as a follow-up event to start the migration for backup-group related savesets.

The following command will start the respective migration after all backups that are part of the group are completed:

sm_event migrate group <migration_task> - 

Replace <migration_task> with the actual name of the migration task, as it is displayed in Tasks -> Migration Tasks (or alternatively in Tasks -> Si3 replication).

Migrate saveset after the backup and delete it after successful migration

First, create a migration task. Once the required task is created, you can set it up as a follow-up event after the backup is completed by entering the following command:

sm_event migrate saveset <migration_task> - -r 1 -

The additional option "-r 1" will be passed to the migration task and the saveset will be deleted after successful migration.

Replace <migration_task> with the actual name of the migration task, as it is displayed in Tasks -> Migration Tasks.

Information sign.png Note
This follow-up event can only be used for migration, not for replication.

Start a single backup task after the backup

To start another backup task after the scheduled backup is finished, specify the following:

sm_event backup task <task_name> - -m <target_pool> -

Replace <task_name> with the name of the backup task and <target_pool> with the target media pool the data should be saved to.

Start a single backup task after all backups of a task group

To start another backup task after all backups of a scheduled task group are finished, specify the following:

sm_cmd backup -G <task_group> -m <target_pool> -@ "sm_event backup taskgroup <task_name> - -m <target_pool> -"

Replace <task_group> with the name of your task group, <target_pool> with the target media pool the data should be saved to, and <task_name> with the name of your backup task which should be started.

Information sign.png Note
The notation sm_event backup taskgroup ensures that all backups of the previous running task group have been completed.

For example, the name of the task group is MY_GROUP, the name of the target pool is MY_MEDIAPOOL, and the task name is SESAM_BACKUP:

sm_cmd backup -G MY_GROUP -m MY_MEDIAPOOL -@ "sm_event backup taskgroup SESAM_BACKUP - -m MY_MEDIAPOOL -"

Start task group after the backup

Sometimes you need to start a task group after the backup is finished:

sm_event backup group <task_group> - -m <target_pool> -l BACKUP-LEVEL -

Replace <task_group> with the name of the task group and <target_pool> with the target media pool the data should be saved to. With backup-level you can define F/C/D/I.

Start event on special drive

To start the target event on a different drive, specify the option -d:

sm_event backup task <task_name> - -m <target_pool> -d <drive_num> -

Send notification after the backup, migration or restore

You can trigger a notification after the backup, migration or restore event is finished.

sm_event notify result <username> -

In the example below, the notification will be send to the username configured as backup within Configuration -> E-Mail Settings.

sm_event notify result backup -

For more information on e-mail configuration, see E-mail Settings. For details on how to send a SEP sesam daily protocol to an email account, check FAQ.