In SEP sesam 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.
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.
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'"
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:
|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 to be started on the SEP sesam Server once the initial event is completed. With SEP sesam v. 5.0.0 Jaglion, the Follow up field is also available when configuring the command events. For details, see Creating a Command Event.
As of version 4.4.3 Grolar, you can use Migration task option to chose a follow up migration task.
|If the 'Migration Task' function is used, whether for a single backup or a group, then the migration will start as soon as one of the backups is finished.|
|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.
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. The follow up command must always end with a hyphen (-). If you add additional parameters to the command, they must also end with a 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
|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 -> Restores and check the verification status.
Migrate or replicate saveset after the backup
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 -> Replication Tasks (previously Si3 Replications).
|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 (or replication), as it is displayed in Tasks -> Migration Tasks or alternatively in Tasks -> Replication Tasks (previously Si3 Replications).
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.
|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.
|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 backup or restore
You can trigger a notification after the backup or restore event has finished.
For the backup, use the following command:
sm_event notify result <username> -
For the restore, use the following command:
sm_event notify restore <username> -
In the following example, the notification is sent to the account configured as backup in Configuration -> Email Settings.
sm_event notify result backup -
Execute script after backup
To execute a script after the backup is finished and pass some additional parameters, use the following command:
sm_event execute <script_name>.sh - <some_additional_parameters> -
Replace <script_name> with the name of the script and <some_additional_parameters> with the desired parameters, e.g., -s savesetID.