5 1 0:Follow-up Events

From SEPsesam


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


Overview


In SEP sesam, event chains can be created by combining backup or command events with different follow-up actions. Follow-up events enable you to configure additional actions that are triggered on the SEP sesam Server after the initial event has successfully completed. This feature allows you to create sequences of actions based on specific events occurring on the backup server. By combining events in this way, you can optimize data management workflows and ensure data integrity.

Key features

The following event chains can be created:

  • configure the system to start a migration or replication process immediately after a backup task or task group has successfully completed.
  • set up a follow-up event to start a single backup task or a task group once the initial backup, task group, or command has successfully finished.
  • automatically start verification of savesets after a backup task or task group has been successfully executed.

Configuring follow-up events

Follow-up events can be configured for backup events and command events. You can customize and automate various follow-up actions. For backup events, SEP sesam provides two distinct options for configuring follow-up events, each with different capabilities to tailor your follow-up actions.

The option Migration Task provides a straightforward way to automate follow-up migration or replication tasks. This action is triggered as soon as the task event is successfully executed. For a backup group, this option starts the migration task immediately after each individual backup task in the group is completed, without waiting for the entire group of backup tasks to finish. This parallel execution ensures faster processing and minimizes delays. Note that this option is not available for command events.

The option Follow-up offers a high degree of customization, allowing you to define the actions that should follow the event, how they should be executed, and when they should occur. This option provides flexibility to configure a wide range of follow-up actions to suit your specific needs. If a backup event is configured for a backup group, this option enables you to define custom follow-up actions for the entire group or individual tasks within the group.

When configuring a migration or replication task for a backup group, the key difference between these two options becomes apparent:

  • the Migration Task option triggers a predefined migration or replication task immediately after each backup task in the group is completed, ensuring parallel execution and priority.
  • the Follow-Up option enables you to fully customize the migration or replication task, giving you the flexibility to start the migration after all tasks in the group are finished.
Note
To initiate migration or replication after a backup event is completed, you can use the Migration task drop-down list to select the appropriate task. This enables you to configure an additional action in the Follow-up field.

If you use both options, the migration task will be executed first, followed by the configured follow-up task.

Testing events in the command line

Before you configure follow-up events for use with backup or command events, you can test them in command line. As initial start of a backup the command line tool sm_cmd is used. For migration or restore the sm_event is used.

The command has the following syntax:

sm_cmd <command> -@ "<event_definition>"

The following example shows an sm_cmd command that 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.

Event-based actions are logged in:

SESAM_INSTALL_DIR/var/log/lgc/sm_event_<date>.log
Note
If you need troubleshooting assistance, provide this log file along with a description of the problem to SEP sesam support for further analysis.

Steps

To configure a follow-up event, follow the steps:

  1. From Main selection -> Scheduling -> Schedules, right-click a schedule. Then select the event type you want to add (New Backup Event or New Command Event).
  2. In the Follow up field, configure the events to be started on the SEP sesam Server once this event is completed. For a migration or replication follow-up event, select the task in the Migration task drop-down list. If you use both options, the migration task is executed first, followed by the configured follow-up event.
  3. Configure the event as required and click OK to save it. For more details on creating events, see Creating a Backup Event or Creating a Command Event.

Screenshots

Examples of follow-up events

In the following examples, the elements in angle brackets (< >) indicate that the enclosed element is mandatory and should be replaced with the appropriate parameter or actual name. Do not include the angle brackets when entering the command in the command line. It is important to note that the follow-up command must always end with a hyphen (-). If you add additional parameters to the command, they should also end with a hyphen.

All the specified tasks and migration tasks should be configured in the GUI before starting the follow-up event. For instance, you should first configure a migration task and then set up the event to migrate saveset after backup.

Verify saveset after backup

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

To verify the backup, use the following command:

sm_event verify saveset -

To verify the backup data after backup is completed, the restore process is initiated. However, only data verification phase is performed, and no data is written to the target system. To check the status of your verification job, in Web UI navigate to Monitoring -> Restores and review the job results.

Migrate or replicate saveset after backup

To migrate or replicate the saveset after a backup, you first need to create a migration task or a replication task. Once the task is configured, you can set it up as a follow-up action in a backup event, which will be triggered automatically after the backup process has successfully finished.

Note that a separate option is provided specifically for follow up migration or replication task.

To start migration or replication after completed backup task, use the following command:

sm_event migrate saveset <migration_task> -

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

Migrate or replicate savesets after backup group

To migrate or replicate the savesets after backup of a task group, you first need to create a migration task or a replication task for that task group. Note that a separate option is provided specifically for follow up migration or replication task.

To start migration or replication after completed backup task group, use the following command:

sm_event migrate group <migration_task> -

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

Migrate and delete saveset after backup

To migrate saveset after backup, and delete the original saveset after a successful migration, first create a migration task.

To start migration and delete saveset after completed migration, use the following command:

sm_event migrate saveset <migration_task> - -r 1 -

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

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

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

Start restore after backup

To start a restore of the backup after scheduled backup event completes, use the following command:

sm_event restore saveset - -R <destination_path> -

Replace the <destination_path> variable with the target directory to which you want to restore the backup (for example, C:\Temp\Test).

Start backup task after backup

To start another backup task after scheduled backup event completes, use the following command:

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

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

Start backup task after backup group

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

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

Replace the <task_group> variable with the name of the task group, <task_name> variable with the name of the backup task, and <target_pool> with the designated target media pool where the data should be saved.

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

Start backup group after backup

To start a backup task group after scheduled backup event completes, use the following command:

sm_event backup group <task_group> - -m <target_pool> -l <backup_level> -

Replace the <task_group> variable with the name of the task group, <target_pool> with the designated target media pool where the data should be saved, and <backup_level> with one of the following: F (for full), C (for copy), D (for differential) or I (for incremental).

Start backup task on different drive

After scheduled backup event, you can start another backup task and specify which drive should be used. Use the following command:

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

Replace the <task_name> variable with the name of the backup task, <target_pool> with the designated target media pool where the data should be saved, and <drive_num> with the drive number that should be used.

Send notification after backup or restore

You can send a notification after backup or restore event has finished. A notification can be sent to any account, configured in Configuration -> Email Settings.

For the backup event, use the following command:

sm_event notify result <account> -

For the restore event, use the following command:

sm_event notify restore <account> -

Replace the <account> variable with the name of the configured email account. For more information on e-mail configuration, see Configuring Email Accounts. For details on how to send a SEP sesam daily protocol to an email account, check FAQ.

Run script after backup

You can execute a script after the backup is finished, and optionally specify additional parameters. Use the following command:

sm_event execute <script_name>.sh - <additional_parameters> -

Replace the <script_name> variable with the name of the script, and <additional_parameters> with optional parameters, for example, -s <savesetID>.


See also

Managing EventsManaging SchedulesCreating a Backup EventCreating a Command EventCommand Line Interface

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.