SEP Sesam CLI

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.

Operate tests for installation and configuration in SEP sesam environments

Get SEP sesam status, log and version information

Determine SEP sesam object information for further use in other programs

Command conventions

The parameters for a command are order-dependent and might include mandatory and optional values, or keyword choices. Mandatory functions are designated by an asterisk (*).

| vertical bar

Separates the choices between two or more options or arguments.

[ ] square brackets

Indicate optional values.

< > angle brackets

Indicate that the enclosed element is mandatory.

Note

The commands are run in the command prompt from <SESAM_ROOT>/bin/sesam/.

Before you begin

SEP sesam CLI is a very powerful command line tool. You should be aware of its implications on your entire environment before you start using it.

Recommendations for using the SEP sesam CLI

SEP sesam's optional command line commands are written directly to the SEP sesam database. Therefore all command line entries should be checked and verified!

SEP sesam executes the commands immediately the <Enter>/<Return> key is pressed, which means that entries cannot be corrected, as is the case with the SEP Sesam GUI. It is extremely important that you are familiar with CLI and use it cautiosly in order not to cause a system failure of the backup environment. Note that an erroneous entry can lead to complete data loss or other damage to the database. Such mistakes can void the warranty of your SEP sesam licensing agreement.

Have a look at a SEP sesam CLI example for the creation of a new SEP sesam environment by SEP sesam CLI. Only after becoming familiar with SEP sesam should you attempt to use the CLI and write your first scripts.

Note

Before you start scripting with the SEP sesam CLI, you should familiarize yourself with the SEP sesam environment. Read the SEP sesam documentation carefully and work on the SEP sesam installation to understand how the SEP sesam objects work together.

SEP sesam CLI usage

The use of the object items of the SEP sesam CLI are described below. Functions can be mandatory or optional. Mandatory functions are designated by an asterisk (*). There will be one or more examples on how to use the command at the end of each object section.

When building a new SEP sesam environment with the CLI, work in the same order as you would when using the SEP sesam GUI. Start with Topology objects, then create tasks and schedules, and finally connect the relevant events (e.g., backup, migration or command) to the schedules.

Attention: Global Deletion

Global deletion option enables you to delete a client or task and all dependent or related objects. This means that if you want to delete a client, you can delete all of its corresponding tasks at the same time. Deleting a task during this process removes it from its task groups and task events. Global deletion is available for clients and tasks. You can enforce global deletion by using the parameter -F YES. The string YES is for security. It verifies that the user actually wants to perform this task.

If a backup client is connected to a loader or drive, it cannot be deleted by Force parameter. First remove the loader or drive and then re-start the client/task deletion.

Client

The SEP sesam Server client object exists as soon as a new SEP sesam Server is installed. Your backup clients must be registered in the SEP sesam environment before they can be used. If you add clients with the SEP sesam GUI during the registration process, SEP sesam Server checks whether the client is visible or accessible. This is not so with the SEP sesam CLI; it is therefore recommended to check client availability by starting a small backup task after adding the client. For details on creating a backup task in GUI, see Standard Backup Procedure.

Interface

The configuration of the interface is only necessary if you want to use a LAN-free backup or a SAN environment. Your backup server must have at least two network interface modules configured with different IP addresses and DNS names. You can then create an interface for every network interface you want to use. For more information, see SEP Sesam Admin Manual.

Data store

The data store is SEP sesam's object for backup to disk. As with data store preparation in the SEP sesam GUI, all corresponding SEP sesam objects, such as drive group, drive and media pool, can be created in one step. For detailed information about the functionality, see SEP sesam data store.

Drive

After drive groups have been created, a drive can be added to the desired drive group. After adding or modifying a drive, SEP sesam immediately creates the internal drive structures. This will cause an interruption of all running backups. To avoid this, use the parameter -o noconfig. The drive configuration will only be written to the SEP sesam database. To use the drive for SEP sesam operations, you must first execute the sm_config_drives command manually.

Inventory

The inventory function allows you to operate an archive adjustment and tape libraries with or without automatic media introduction.

Usage:

sm_cmd <start> inventory <loader number> [OPTIONS...]

Options:

-d drive number (* if -G or -d is set)
-i <action> no|take|overwrite do not introduce any media|take|overwrite
SEP sesam media which are not in archive (default: no)
-m media pool (* -i is set)
-t volume type (* -i is set)
-s slot_area <[0-9]{1,3}-[0-9]{1,3}>
Slot area, when not given all slots are handled.
The syntax for this parameter is n-m, e.g., 2-9.
First valid slot number is 0.
-c Check label flag, when set the label on tape is always checked,
do not rely on the barcode information only.
-f Fast mode, when set label is read without retry in case of failure.
Use this switch together with introduce switch only when you are
sure that your call may introduce only new media.
-L Storage pool location for DISK_HARD media
-G drive group (* if -G or -d is set)
-n <adjust with barcode>

Examples:

Without media introduction, only adjust the SEP sesam media information with the physical library.

sm_cmd start inventory 2 -d 3 -m DAYPOOL -t LTO_Tape -s 2-7 -c

With media introduction, new media will be assigned to the media pool "DAYPOOL".

Schedules & Events

Schedule

If you want to execute backups to a specific timetable, tasks must be created first. A schedule must then be created and the task and schedule added to a backup event. Different event types can be connected to a schedule (see below). For reference, see the alternate GUI method of standard backup procedure .
Usage:

The difference between a task and an event is as follows: a task is the actual job definition whereas the event determines how it is executed. In some cases, task properties can be overridden by the event.

Get SEP sesam information from database and logging

Display SEP sesam database content

The content of the SEP sesam database can be displayed by SEP sesam object (client, task, schedule etc.) using the list command. A special filter can be set to display options and configure the output.

Display SEP sesam information and logs

Special SEP sesam information such as SEP sesam version, license and current drive status information can be displayed using the show command. In addition, SEP sesam log information can be displayed using show log.

-B <today|yesterday|YYYY-MM-DD> start date (date argument of this parameter must be before -E end date, if only this parameter is set, all days between this and current date are show)
-E <today|yesterday|YYYY-MM-DD> end date (show single day, if only this parameter is set)
-D <today|yesterday|YYYY-MM-DD> single SEP sesam day

Parameter for type 'current'

-d <[0-9]> show current messages depends on drive number (default show all drives)

Examples:

sm_cmd show log sesam (current day)
sm_cmd show log error -B 2012-01-16 (all days between 2012-01-16 and today)
sm_cmd show log state -B 2012-01-08 -E 2012-01-16
sm_cmd show log notify -D yesterday
sm_cmd show license
sm_cmd show calendar (Show activities of current date)
sm_cmd show version (Show version of SEP sesam components, similar to GUI About dialog)
sm_cmd show current (Show state of drives)

Control notification center

Send a notification to all GUI clients connected to the SEP sesam server.

Update GUI

Usage:

sm_cmd <update> gui [OPTIONS...]

Options:

-a alternative path for SEP sesam 'jar' file

Direct access to the SEP sesam database

Attention: DB Direct Access

When executing a direct SQL command, there is no validation check of the command. Incorrect use (update or delete) can therefore destroy the SEP sesam database! Be EXTREMELY careful when using a SQL command directly.

On other days, the backup task lx01_etc will be executed as a differential backup to the media pool DAY. Every Sunday, the priority 2 backup of the schedule sunday-backup overrides the daily-backup schedule with prio 1. The prio 1 backup is then suppressed. For details on how SEP sesam handles event priorities, see SEPuler: Event Priority.