4 4 3 Beefalo:SEP sesam CLI
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.
Overview
The SEP sesam command line interface (CLI) is a utility that provides an alternate way of executing SEP sesam commands in UNIX and Windows environments. SEP sesam command line interface provides two CLI components: administration utility SEP sesam CLI and client utility SBC CLI. The latter is used to back up and restore data locally on the host.
SEP sesam CLI administration utility provides all of the functions available via SEP sesam graphical management interface and also additional CLI commands that are not available in the GUI. Note that different commands can be available depending on your SEP sesam license.
SEP sesam CLI commands can be used to install and configure a SEP sesam environment automatically without a GUI. They enable administrators to access SEP sesam database and manage the whole SEP sesam environment, for example, to install, configure and manage SEP sesam Servers and Clients centrally without a GUI. Every CLI command (except a native SQL statement) checks and follows the internal structure and dependencies of the SEP sesam database.
Features
- Automatic configuration of SEP sesam environments after installation (e.g., on implementation)
- Change the SEP sesam configuration without using the SEP sesam GUI
- Script-based mass installation and configuration (e.g., provider environment)
- 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
Running CLI commands
You must have SEP sesam administrator privileges to run SEP sesam CLI commands and use the command prompt as an administrator. All commands are run from the <SESAM_ROOT>/bin/sesam/
directory. If you want to execute SEP sesam commands globally (and not from the actual run directory), set the SEP sesam profile as described in What happens when I set a profile?.
Understanding the command structure
The SEP sesam general syntax for a CLI command is:
sm_cmd <command> [–option] [<object>] [[–<parameter>] <value>]
where the following information is provided for each command
- sm_cmd: A command line tool that invokes the command line interface.
- Usage: The actual syntax of the command, including the arguments.
- Description: A brief summary of what the command does.
- Arguments: The definition of options used in the command.
- Example: Example of the command usage of the specified command and its options.
Command conventions
The parameters for a command are order-dependent and might include required and optional values or keyword choices, depending on how the information is bracketed. Required parameters are marked with an asterisk (*). An example is provided below.
- | 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.
- Example
sm_cmd <get|list|add|modify|backup|remove|restart> taskevent [OPTIONS...]
One of the actions bracketed with < > symbols, in this case <get|list|add|modify|backup|remove|restart>, is required, while the [OPTIONS...] are enclosed with [ ] symbols, therefore the information requested is optional. The following options are available for our sample taskevent command.
OPTIONS: -@ [param] follow up (command to be run after the event completes) -G [ID] task group -S [ID] name of the interface -Z [number] stop task if it runs longer than (e.g. 8:00 means that the task is automatically stopped after 8 hours) -d [ID] drive number -j [ID] backup task -l [param] backup level (C = Copy, F = Full, D = Differential, I = Incremental) -m [ID] * media pool -s [0|1] source-side deduplication
Let's say that we want to run a backup event for a backup task named win-cli_c_drive and use the target media pool (to which the data will be backed up) MP_disk_week. The command would look like this:
sm_cmd backup taskevent -j win-cli_c_drive -m MP_disk_week
Getting help
To list all available options, use the main help sm_cmd help. To show help for specific object, use sm_cmd help <object>, for example, sm_cmd help client.
Common action commands
The action command is used to perform an action or retrieve information/status about the resource. Most SEP sesam CLI resources have the following action commands:
- get
- The get command retrieves information about the resource or the operation that is currently defined.
- list
- The list command returns a list of objects for the specified resource. If the optional <object_name_or_id> is also specified, then the results are filtered by that value.
- add
- The add command creates a new object or event. If the optional <object_name_or_id> is also specified, then the objects are created according to the specified value.
- modify
- The modify command changes an existing resource based on the specified object options.
- remove
- The remove command deletes the specified object.
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 cautiously 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.
![]() |
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 and configuration to understand how the SEP sesam objects work together. |
SEP sesam CLI usage
Configuration and administration commands
The following are the commands that allow you to configure and execute the administrator’s tasks for SEP sesam.
(EMAIL) ACCOUNT (account)
- Usage
sm_cmd <get|list|add|modify|remove|send> account [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single email account, list all email accounts depending on list options (see options listed in main help sm_cmd help), create a new email account, modify an existing account, and delete the specified account. Additionally, you can send a message to the given email account and attach multiple local files by using send mail [OPTIONS...] ID.
ACL
- Usage
sm_cmd <get|list|remove|check> acl [OPTIONS...]
- Description
- By using action commands – get, list, remove – you can get a single access control list (ACL), list all ACL entries depending on list options (see options listed in main help sm_cmd help) or list all ACL entries of a given user and/or object, and delete the specified ACL (ID=all will delete all configured ACLs).
BACKUP
- Usage
sm_cmd backup [OPTIONS...]
- Description
- By using the backup command you can start the task or task group backup according to the specified parameters.
CLEAR CACHE
- Usage
sm_cmd clear cache [OPTIONS...]
or
sm_cmd clear cache -t
- Description
- By using the clear cache command you can clear the entire server cache according to the specified parameters; the '-t' parameter sets table filter for clear cache.
CALENDAR
- Usage
sm_cmd <get|list|add|modify|remove> calendar [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single calendar, list all calendars depending on list options (see options listed in main help sm_cmd help), create a new calendar with an automatically generated ID, modify and delete a calendar; ID can be a character string ID or a numeric ID value.
CALENDAR EVENT (calendarevent)
- Usage
sm_cmd <get|list|add|modify|remove> calendarevent [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single calendar event, list all calendar events depending on list options (see options listed in main help sm_cmd help), create a new calendar event, modify and delete a calendar event.
CLIENT
- Usage
sm_cmd <get|list|add|modify|remove|dir> client [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single client, list all clients depending on list options (see options listed in main help sm_cmd help), create, modify and delete a client. By using sm_cmd dir client ID you can also browse the directory of the client (check sm_cmd help dir for details).
COMMAND
- Usage
sm_cmd <get|list|add|modify|start|remove> command [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, start, remove – you can get a single command, list all commands depending on list options (see options listed in main help sm_cmd help), create, modify and execute a command, as well as delete the specified command.
COMMAND EVENT (commandevent)
- Usage
sm_cmd <get|list|add|modify|remove> commandevent [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single command event, list all events depending on list options (see options listed in main help sm_cmd help), create a new command event with an automatically generated ID, modify and remove a command event.
CREDENTIAL
- Usage
sm_cmd <get|list|add|modify|enable|disable|link|unlink|remove> credential [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get an existing credential set (by ID or name), list all credential sets depending on list options (see options listed in main help sm_cmd help), add a new credential set, modify and delete an existing credential set (only if there are no more references). Additionally, you can link/unlink a credential set to/from a SEP sesam object, i.e., a data store. Specifically for LDAP or AD credential sets, you can enable or disable a credential set (by ID or name).
DATA STORE (datastore)
- Usage
sm_cmd <get|list|add|modify|remove> datastore [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single data store, list all data stores depending on list options (see options listed in main help sm_cmd help), create and modify a data store, and remove a data store with all dependencies.
DEFAULT KEY (default)
- Usage
sm_cmd <get|list|add|modify|remove> default [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get the value of the default key, list all default keys (see options listed in main help sm_cmd help), add a new default key and its value, modify the value of the default key, and delete the specified default key.
DRIVE
- Usage
sm_cmd <get|list|add|modify|remove|start|mount|dismount|unload> drive [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single drive, list all drives (see options listed in main help sm_cmd help), create a new drive with an automatically generated ID, modify and delete a drive. By using sm_cmd start drive ID you can configure the specified drive. Additionally, you can mount and dismount a drive by using sm_cmd <mount|dismount> drive ID and eject the tape in the drive with sm_cmd unload drive ID.
DRIVE GROUP (drivegroup)
- Usage
sm_cmd <get|list|add|modify|remove> drivegroup [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single drive group, list all drive groups (see options listed in main help sm_cmd help), create a new drive group, modify and delete a drive group.
(USER) GROUP (group)
- Usage
sm_cmd <get|list|add|modify|remove> group [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single user group, list all user groups (see options listed in main help sm_cmd help), create a new user group, modify and delete a user group.
INTERFACE
- Usage
sm_cmd <get|list|add|remove> interface [OPTIONS...]
- Description
- By using action commands – get, list, add, remove – you can get a single interface, list all interfaces (see options listed in main help sm_cmd help), create a new interface, and delete the specified interface.
INVENTORY (start inventory)
- Usage
sm_cmd start inventory [OPTIONS...]
- Description
- By using the start inventory command you can start archive adjustment to make a comparison between media in the loader (tape library) and the SEP sesam media archive database, and perform a database synchronization with the selected loader.
LICENSE
- Usage
sm_cmd <show|update|report> license [OPTIONS...]
- Description
- By using update, show and report commands you can check your license and generate a report, as well as update your current license.
LOADER
- Usage
sm_cmd <get|list|add|modify|remove|load|unload|import|export> loader [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single loader, list all loaders (see options listed in main help sm_cmd help), create a new loader, modify and delete the loader. By using sm_cmd load loader [OPTIONS...] you can move the tape cartridge from the specified magazine slot into the specified drive and initiate the opposite operation by using sm_cmd unload loader [OPTIONS...]. You can also import the tape cartridge into the magazine and export it by using sm_cmd <import|export> loader [OPTIONS...].
LOADER DEVICE (loaderdevice)
- Usage
sm_cmd <get|list|add|modify|remove> loaderdevice [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single loader device, list all loader devices (see options listed in main help sm_cmd help) and create a new loader device for the existing loader by specifying its ID and the slot. You can also modify or delete an existing loader.
LOCATION
- Usage
sm_cmd <get|list|add|modify|remove> location [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single location (an ID can be a character string or a numeric ID value), list all locations (see options listed in main help sm_cmd help), create a new location with an automatically generated ID, modify and delete a location.
MEDIA
- Usage
sm_cmd <get|list|add|modify|remove> media [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single medium, list all media (see options listed in main help sm_cmd help), add a new medium to the media archive (the media label is set automatically), modify a medium, and remove the data set of the specified media from the archive (only possible if the drive/EOL is not active).
MEDIA POOL (mediapool)
- Usage
sm_cmd <get|list|add|modify|remove> mediapool [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single media pool, list all media pools (see options listed in main help sm_cmd help), create a new media pool, modify and delete an existing media pool.
MEDIA POOL EVENT (mediapoolevent)
- Usage
sm_cmd <get|list|add|modify|start|init|remove> mediapoolevent [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single media pool event, list all media events (see options listed in main help sm_cmd help), create and modify a media event, and delete the specified media pool event(s). You can also start a media pool event by using sm_cmd start mediapoolevent [OBJECT OPTIONS...] and initialize a media pool with sm_cmd init mediapoolevent [OBJECT OPTIONS...].
MIGRATE
- Usage
sm_cmd migrate [OPTIONS...]
- Description
- By using the migrate command you can start migration immediately.
MIGRATION
- Usage
sm_cmd <get|list|add|modify|remove|start> migration [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single migration event, list all migration events (see options listed in main help sm_cmd help), create (with an automatically generated ID) and modify a migration event, and remove the migration event(s). By using sm_cmd start migration [OBJECT OPTIONS...] you can immediately start the specified migration process.
MIGRATION TASK (migrationtask)
- Usage
sm_cmd <get|list|add|modify|remove> migrationtask [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single migration task, list all migration tasks (see options listed in main help sm_cmd help), create a new migration task, modify and delete an existing migration task.
NEWDAY EVENT (newdayevent)
- Usage
sm_cmd <get|list|add|modify|start|remove> newdayevent [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single NEWDAY event, list all NEWDAY events (see options listed in main help sm_cmd help), create a new NEWDAY event (with an automatically generated ID), modify and delete a NEWDAY event. You can also immediately start a NEWDAY event by using sm_cmd start newdayevent [OBJECT OPTIONS...].
NOTIFICATION
- Usage
sm_cmd <get|list|add|modify> notification [OPTIONS...]
- Description
- By using action commands – get, list, add, modify – you can get the specified notification, list all notifications (see options listed in main help sm_cmd help), create a new notification, and modify a single notification or all notifications for one object. Notification module options are: [LICENSE|LICENSE_EULA|LICENSE_INFO|LICENSE_VIOLATION|CBT_INFO|CLI_INFO|RSS_INFO|EMAIL_INFO|EXCHANGEDOTNET_INFO|MOSS_INFO|KERNEL]
RENDER
- Usage
sm_cmd render [OPTIONS...]
- Description
- By using the render command you can render a template with the specified input data i.e. to generate a report.
RESTART BACKUPS/MIGRATIONS (<list|restart>)
- Usage
sm_cmd <list|restart> [OPTIONS...]
- Description
- By using the list restart command you can list all results where the backups/migrations can be restarted and then restart the selected backup/migration.
RESTORE EVENT (restoreevent)
- Usage
sm_cmd <get|list|add|modify|restore|start|remove> restoreevent [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single restore event, list all restore events (see options listed in main help sm_cmd help), create (with an automatically generated ID) and modify a restore event, and remove the selected restore event(s). By using sm_cmd restore restoreevent [OPTIONS...] you can add and start a restore job. Use sm_cmd start restoreevent [OBJECT OPTIONS...] to immediately start the selected restore job.
RESTORE TASK (restoretask)
- Usage
sm_cmd <get|list|add|modify|start|remove> restoretask [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single restore task, list all restore tasks (see options listed in main help sm_cmd help), modify and delete a restore task. By using sm_cmd add restoretask [OBJECT OPTIONS...] you can create a new restore task. Use sm_cmd start restoretask [OBJECT OPTIONS...] to immediately start the restore defined by the specified restore task.
SCHEDULE
- Usage
sm_cmd <get|list|add|modify|rename|remove|start> schedule [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single schedule, list all schedules (see options listed in main help sm_cmd help), create, modify and delete a schedule. By using sm_cmd rename schedule [OBJECT OPTIONS...] ID you can rename an existing schedule. Use sm_cmd start schedule [OBJECT OPTIONS...] ID to immediately start all events of the specified schedule.
START
- Usage
sm_cmd start <task|restore|migration|command> [OPTIONS...]
- Description
By using the start command you can start the specified event, such as backup, restore, migration, and command event.
TASK
- Usage
sm_cmd <get|list|add|modify|start|remove> task [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single backup task, list all backup tasks (see options listed in main help sm_cmd help), create a new task, modify and delete a task. By using sm_cmd start task [OPTIONS...] you can immediately start the selected backup task or all tasks of the selected task group.
TASK EVENT (taskevent)
- Usage
sm_cmd <get|list|add|modify|backup|remove|restart> taskevent [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single task event, list all task events (see options listed in main help sm_cmd help), create (with an automatically generated ID) and modify a task event, and delete the specified task event(s). By using sm_cmd restart taskevent [OPTIONS...] you can immediately restart backup/migration according to the specified savesets or sesam day. In the latter case, only failed backups will be restarted.
(GENERATE) TASKS (taskgen)
- Usage
sm_cmd add taskgen [OPTIONS...]
- Description
- By using the add taskgen command you can generate tasks of the specified task type. This is mainly used for the generation of VM backup tasks. For Details, see Generating VM tasks.
TASK GROUP (taskgroup)
- Usage
sm_cmd <get|list|add|modify|start|remove> taskgroup [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single task group, list all task groups (see options listed in main help sm_cmd help), create and modify a task group, and remove the specified task group with all relations to the tasks. By using sm_cmd start taskgroup [OPTIONS...] you can immediately start all backup tasks of the specified task group.
TASK GROUP RELATIONS (taskgrouprelation)
- Usage
sm_cmd <get|list|add|modify|remove> taskgrouprelation [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get task group relations for the specified task group (see options listed in main help sm_cmd help), list all task group relations, create a new task group relation, modify an existing task group relation, and delete the specified task group relation. Use -j for task names separated by commas and -n for specifying the tasks start order <[0-9]>. Additionally, you can remove all tasks from a task group by using -A [0|1].
UPDATE JAR
- Usage
sm_cmd <download|list> update [OPTIONS...]
- Description
- By using the download/list update command you can list available JAR (.jar) updates and download the selected JAR update(s) from the server.
USER
- Usage
sm_cmd <get|list|add|modify|remove|reset> user [OPTIONS...]
- Description
- By using action commands – get, list, add, modify, remove – you can get a single user, list all users (see options listed in main help sm_cmd help), create, modify and delete a user. By using sm_cmd reset user ID you can reset a password of the specified user (you have to be logged in to SEP sesam Server console).
vSPHERE
- Usage
sm_cmd <resetcbt|check|generate|list> vsphere [OPTIONS...]
- Description
- By using sm_cmd resetcbt vsphere [OPTIONS...] you can reset CBT by specifying the task name -j [ID] or directly via VM name and vSphere server input. To check the connection to vSphere server, use sm_cmd check vsphere [OPTIONS...]. To generate the vSphere tasks for the specified VMs, use sm_cmd generate vsphere [OPTIONS...]. For Details, see Generating VM tasks. By using the list command you can list license information or use list vsphere -V <VM> -c <VM server> -m snapshot to list VM snapshots.
Monitoring commands
The following are the commands that display information about SEP sesam environment.
ALL EVENTS (allevent)
- Usage
sm_cmd list allevent [OPTIONS...]
OR
sm_cmd list [LIST OPTIONS] allevent [FILTER OPTIONS...]
- Description
- By using the list allevent command you can list all events or list all events depending on list options (see options listed in main help sm_cmd help) in a table format.
ALL RESULTS (allresult)
- Usage
sm_cmd list allresult [OPTIONS...]
OR
sm_cmd list [LIST OPTIONS] allresult [FILTER OPTIONS...]
- Description
- By using the list allresult command you can list all results or list all results depending on list options (see options listed in main help sm_cmd help).
CALENDAR SHEET (calendarsheet)
- Usage
sm_cmd <download|show> calendarsheet [OPTIONS...]
- Description
- By using the <download|show> calendarsheet command you can download or display the calendar information for the specified time frame.
CURRENT DRIVE (current)
- Usage
sm_cmd <download|show> current [OPTIONS...]
- Description
- By using the <download|show> current command you can download or display the current drive information from the server.
DIR
- Usage
sm_cmd dir <argument> [OPTIONS...]
- Description
- By using the dir command you can list all configured clients, all elements with task type Path for a client, and client's root directory. By using "/<client name>/VMware vSphere:/" you can list client's VMware content. By using sm_cmd dir vsphere you can list all VMs and use additional options to list VMs from vCenter according to the specified parameters.
LOG
- Usage
sm_cmd <download|show|list> log <alarm|backup|disaster|error|media|migration|notify|restore|sesam|state> [OPTIONS...]
- Description
- By using the <download|show|list> log command you can download log files or other relevant information from the server to the local file system, display the content of these files from the server, and list available logs or other relevant information.
OPERATING SYSTEM (opersystem)
- Usage
sm_cmd <get|list> opersystem [OPTIONS...]
AND
sm_cmd <get|list> os [OPTIONS...]
- Description
- By using action commands – get, list – you can get a single operating system and list all operating systems (see options listed in main help sm_cmd help).
RESULT
- Usage
sm_cmd <get|list> result [OPTIONS...]
- Description
- By using action commands – get, list – you can can get a single result for the specified resource and list all results filtered by options (see options listed in main help sm_cmd help).
SAVESET
- Usage
sm_cmd dir saveset [OPTIONS...]
- Description
- By using the dir saveset command you can browse the specified saveset ID.
SERVICES
- Usage
sm_cmd <download|show> services [OPTIONS...]
- Description
- By using the download/show services command you can display or download different data files and logs, such as backup log and restore log by specifying the relevant saveset ID, and media and migration log by specifying the ID of the media or migration state.
SESSION
- Usage
sm_cmd list session [OPTIONS...]
- Description
- By using the list session command you can list all active sessions (see options listed in main help sm_cmd help).
START REPORT
- Usage
sm_cmd start report [OPTIONS...]
- Description
- By using the start report command you can create customized reports. Templates are located in the <SESAM_BIN>/skel/templates/rythm directory.
VERSION
- Usage
sm_cmd show version [OPTIONS...]
- Description
- By using the show version command you can identify the used version of the SEP sesam Server and Client package.