4 4 3 Beefalo:SEP sesam CLI
Copyright © SEP AG 1999-2020. 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.
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.
- 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.
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.
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
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:
- The get command retrieves information about the resource or the operation that is currently defined.
- 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.
- 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.
- The modify command changes an existing resource based on the specified object options.
- 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 change the SEP sesam database directly. 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.
|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.|