4 4 3 Beefalo:SEP sesam CLI: Difference between revisions

From SEPsesam
m (Marked Jaglion version)
(35 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Draft Upcoming Release|''4.4.3 Beefalo V2''}}
<translate>
<!--T:237-->
<noinclude><languages />
{{Copyright SEP AG|en}}
{{Copyright SEP AG|en}}


{{Navigation_latest|release=[[SEP_sesam_Release_Versions|4.4.3/4.4.3 ''Beefalo'']]|link=[[SEP_sesam_Documentation#previous|documentation archive]]}}<br />
<!--T:2-->
==Overview==
{{Navigation_latest|release=[[SEP_sesam_Release_Versions|4.4.3 ''Beefalo''/5.0.0 ''Jaglion'']]|link=[[Archive:SEP_Sesam_CLI|documentation archive]]}}</translate><br />
<div class="boilerplate metadata" id="Additional resources" style="background-color:#ecedf1; color:#8695a7; border: 1px ridge #cdd3db; margin: 0.5em; padding: 0.5em; float: right; width: 35%; "><center><b>Additional resources</b></center>
</noinclude>===<translate><!--T:3--> Overview</translate>===
<noinclude><div class="boilerplate metadata" id="Additional resources" style="background-color:#ecedf1; color:#8695a7; border: 1px ridge #cdd3db; margin: 0.5em; padding: 0.5em; float: right; width: 35%; "><center><b><translate><!--T:4--> Additional resources</translate></b></center>
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP_next.png|45px|link=Special:MyLanguage/4 4 3 Beefalo:SEP sesam CLI|]]
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP_next.png|45px|link=Special:MyLanguage/4 4 3 Beefalo:SEP sesam CLI|]]
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | See also: [[Special:MyLanguge/4 4 3 Beefalo:CLI Configuration Example|CLI configuration example]] – [[SBC CLI]] – [[Special:MyLanguage/SEP_sesam_GUI|SEP sesam GUI]]
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:5--> See also: <!--[[Special:MyLanguage/4 4 3 Beefalo:CLI Configuration Example|CLI configuration example]] – -->[[Special:MyLanguage/SBC_CLI|SBC CLI]] – <!--[[Special:MyLanguage/Archive:SEP_sesam_sm_Commands|SEP sesam sm Commands]] – -->[[Special:MyLanguage/Useful_SEP_sesam_Commands|Useful SEP sesam Commands]] – [[Special:MyLanguage/SEP_sesam_GUI|SEP sesam GUI]]</translate>
|}
|}


{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP Troubleshooting.png|45px|link=Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]]
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP Troubleshooting.png|45px|link=Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]]
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | Problems? See: [[Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]] – [[SBC Messages]]
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:6--> Problems? See: [[Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]] – [[SBC Messages]]</translate>
|}
|}
</div>
</div></noinclude>
<translate><!--T:7-->
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'''.  
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 is used to install and configure a [[Special:MyLanguage/SEP_sesam_Glossary#SEP_sesam_environment|SEP sesam environment]] automatically without a GUI. CLI commands enables 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.
<!--T:8-->
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.


=== Features ===
<!--T:9-->
* Automatic configuration of SEP sesam environments after installation (e.g., on implementation)
SEP sesam CLI commands can be used to install and configure a [[Special:MyLanguage/SEP_sesam_Glossary#SEP_sesam_environment|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.
* 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


==Understanding the command structure==
==== Features ==== <!--T:10--></translate>
* <translate><!--T:11--> Automatic configuration of SEP sesam environments after installation (e.g., on implementation)</translate>
* <translate><!--T:12--> Change the SEP sesam configuration without using the SEP sesam GUI</translate>
* <translate><!--T:13--> Script-based mass installation and configuration (e.g., provider environment)</translate>
* <translate><!--T:14--> Operate tests for installation and configuration in SEP sesam environments</translate>
* <translate><!--T:15--> Get SEP sesam status, log and version information</translate>
* <translate><!--T:16-->
Determine SEP sesam object information for further use in other programs


====Running CLI commands==== <!--T:17-->
<!--T:18-->
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 {{Sesamroot|/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 [[Special:MyLanguage/FAQ#profile_setting|What happens when I set a profile?]].
===Understanding the command structure=== <!--T:19-->
<!--T:20-->
The SEP sesam general syntax for a CLI command is:
The SEP sesam general syntax for a CLI command is:
  sm_cmd <command> [–option] [<object>] [[–<parameter>] <value>]
  sm_cmd <command> [–option] [<object>] [[–<parameter>] <value>]
where the following information is provided for each command
where the following information is provided for each command</translate>
*''sm_cmd'': A command line tool that invokes the command line interface.
*''sm_cmd'': <translate><!--T:21--> A command line tool that invokes the command line interface.</translate>
*Usage: The actual syntax of the command, including the arguments.
*<translate><!--T:22--> Usage: The actual syntax of the command, including the arguments.</translate>
*Description: A brief summary of what the command does.
*<translate><!--T:23--> Description: A brief summary of what the command does.</translate>
*Arguments: The definition of options used in the command.
*<translate><!--T:24--> Arguments: The definition of options used in the command.</translate>
*Example: Example of the command usage of the specified command and its options.
*<translate><!--T:25-->
Example: Example of the command usage of the specified command and its options.
 
====Command conventions==== <!--T:26-->


===Command conventions===
<!--T:27-->
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 (*).
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.</translate>
;| vertical bar:Separates the choices between two or more options or arguments.
;| <translate><!--T:28--> vertical bar:Separates the choices between two or more options or arguments.</translate>
;[ ] square brackets:Indicate optional values.
;[ ] <translate><!--T:29--> square brackets:Indicate optional values.</translate>
;< > angle brackets:Indicate that the enclosed element is mandatory.
;< > <translate><!--T:30--> angle brackets:Indicate that the enclosed element is mandatory.</translate>
{{note|The commands are run in the command prompt from {{Sesamroot|/bin/sesam/}}.}} You must have administrator privileges to run CLI commands. Set the SEP sesam profile as described in [[Special:MyLanguage/FAQ#profile_setting|What happens when I set a profile?]] to be able to execute SEP sesam commands globally.


==={{anchor|action_commands}}Common action commands===
;''<translate><!--T:31--> Example:</translate>''
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===
sm_cmd <get|list|add|modify|backup|remove|restart> taskevent [OPTIONS...]
<translate><!--T:32--> One of the actions bracketed with < > symbols, in this case <tt><get|list|add|modify|backup|remove|restart></tt>, is required, while the [OPTIONS...] are enclosed with [ ] symbols, therefore the information requested is optional. The following options are available for our sample <tt>taskevent</tt> command.</translate>
 
OPTIONS:
    -@ [param]    <translate><!--T:33--> follow up (command to be run after the event completes)</translate>
    -G [ID]        <translate><!--T:34--> task group</translate>
    -S [ID]        <translate><!--T:35--> name of the interface</translate>
    -Z [number]    <translate><!--T:36--> stop task if it runs longer than (e.g. 8:00 means that the task is automatically stopped after 8 hours)</translate>
    -d [ID]        <translate><!--T:37--> drive number</translate>
    -j [ID]        <translate><!--T:38--> backup task</translate>
    -l [param]    <translate><!--T:39--> backup level (C = Copy, F = Full, D = Differential, I = Incremental)</translate>
    -m [ID]        <translate><!--T:40--> media pool</translate>
    -s [0|1]      <translate><!--T:41-->
source-side deduplication
 
<!--T:42-->
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:</translate>
 
sm_cmd backup taskevent -j win-cli_c_drive -m MP_disk_week
<translate>===={{anchor|help}}Getting help==== <!--T:43-->
 
<!--T:44-->
To list all available options, use the main help <tt>sm_cmd help</tt>. To show help for specific object, use <tt>sm_cmd help <object></tt>, for example, <tt>sm_cmd help client</tt>.
 
===={{anchor|action_commands}}Common action commands==== <!--T:45-->
 
<!--T:46-->
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:</translate>
;get:<translate><!--T:47--> The <tt>get</tt> command retrieves information about the resource or the operation that is currently defined.</translate>
;list:<translate><!--T:48--> The <tt>list</tt> 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.</translate>
;add:<translate><!--T:49--> The <tt>add</tt> 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.</translate>
;modify:<translate><!--T:50--> The <tt>modify</tt> command changes an existing resource based on the specified object options.</translate>
;remove:<translate><!--T:51-->
The <tt>remove</tt> command deletes the specified object.
 
====Before you begin==== <!--T:52-->
 
<!--T:53-->
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.
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'''
<!--T:54-->
*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!
'''Recommendations for using the SEP sesam CLI'''</translate>
*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.
*<translate><!--T:55--> SEP sesam's optional command line commands change the SEP sesam database directly. Therefore all command line entries should be checked and verified!</translate>
*Have a look at a [[Special:MyLanguge/4 4 3 Beefalo:CLI Configuration Example|CLI configuration 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.
*<translate><!--T:56--> 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.</translate>
{{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.}}
<!-- *Have a look at a [[Special:MyLanguage/4 4 3 Beefalo:CLI Configuration Example|CLI configuration 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.-->
{{<translate><!--T:57--> note</translate>|<translate><!--T:58--> 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.</translate>}}


==SEP sesam CLI usage==
<translate>===SEP sesam CLI usage=== <!--T:59--></translate>
{| border="2" cellpadding="4" cellspacing="0" style="width:90%; margin: 1em 1em 1em 0; background: #fcfcfc; border: 1px #aaa solid; border-collapse: collapse;"
{| border="2" cellpadding="4" cellspacing="0" style="width:90%; margin: 1em 1em 1em 0; background: #fcfcfc; border: 1px #aaa solid; border-collapse: collapse;"
|- style="background:#FFCC01; color:#002F55"
|- style="background:#FFCC01; color:#002F55"
! scope="col" style="text-align:left;" | Command
! scope="col" style="text-align:left;" | <translate><!--T:60--> Command</translate>
! scope="col" style="text-align:left;" | Alias
! scope="col" style="text-align:left;"| <translate><!--T:61--> Description</translate>
! scope="col" style="text-align:left;"| Description
! scope="col" style="text-align:left;" | Note
|-  
|sm_cmd || ||CLI main call || Each command is preceded by ''sm_cmd'' that invokes the command line interface. ||
|-  
|-  
|[[4_4_3_Beefalo:SEP_sesam_CLI#account|sm_cmd ''<nowiki><get|list|add|modify|remove|send></nowiki>'' account]]|| ||Create and administer email accounts. ||  ||
|sm_cmd ''<nowiki><get|list|add|modify|remove|send></nowiki>'' account|| <translate><!--T:62--> Create and administer email accounts.</translate>
|-
|sm_cmd ''<nowiki><get|list|remove|check></nowiki>'' acl|| <translate><!--T:63--> List or delete access control list (ACL).</translate>
|-
|sm_cmd list allevent|| <translate><!--T:64--> List all SEP sesam events.</translate>
|-
|sm_cmd list allresult|| <translate><!--T:65--> List all results within the specified time period.</translate>
|-
|sm_cmd backup||  <translate><!--T:66--> Start the backup task or the backups of the task group.</translate>
|-
|sm_cmd clear cache||  <translate><!--T:67--> Clear the entire server cach.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' calendar||Create and administer calendars.
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' calendarevent|| <translate><!--T:68--> Create and administer calendar events.</translate>
|-
|sm_cmd ''<nowiki><download|show></nowiki>'' calendarsheet||<translate><!--T:69--> Display or download calendar information.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove|dir></nowiki>'' client|| <translate><!--T:70--> Create and administer clients.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|start|remove></nowiki>'' command|| <translate><!--T:71--> Create and administer commands.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' commandevent|| <translate><!--T:72--> Create and administer command events.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|enable|disable|link|unlink|remove></nowiki>'' credential|| <translate><!--T:73--> Configure and administer credentials.</translate>
|-
|sm_cmd ''<nowiki><download|show></nowiki>'' current||<translate><!--T:74--> Display or download the current drive information.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' datastore||<translate><!--T:75--> Create and administer data stores.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' default||<translate><!--T:76--> Configure and administer default keys.</translate>
|-
|sm_cmd dir ''<nowiki><argument></nowiki>''||<translate><!--T:77--> List all specified clients, elements, VMs, etc.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove|start|mount|dismount|unload></nowiki>'' drive|| <translate><!--T:78--> Create and administer drives.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' drivegroup|| <translate><!--T:79--> Create and administer drive groups.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' group|| <translate><!--T:80--> Create and administer user groups.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|remove></nowiki>'' interface|| <translate><!--T:81--> Create and administer [[Special:MyLanguage/SEP_sesam_Glossary#interfaces#|interfaces]].</translate>
|-
|sm_cmd start inventory|| <translate><!--T:82--> Start [[Special:MyLanguage/SEP_sesam_Glossary#archive_adjustment|archive adjustment]].</translate> 
|-
|sm_cmd ''<nowiki><show|update|report></nowiki>'' license|| <translate><!--T:83--> Check the SEP sesam license information and update the license.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove|load|unload|import|export></nowiki>'' loader|| <translate><!--T:84--> Create and administer [[Special:MyLanguage/SEP_sesam_Glossary#loader|loaders]].</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' loaderdevice|| <translate><!--T:85--> Create and administer loader devices.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' location|| <translate><!--T:86--> Create and administer [[Special:MyLanguage/SEP_sesam_Glossary#location|locations]].</translate>
|-
|sm_cmd ''<nowiki><download|show|list></nowiki>'' log|| <translate><!--T:87--> Monitor and download [[Special:MyLanguage/SEP_sesam_Glossary#logging|log files]] from the server.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' media|| <translate><!--T:88--> Create and administer storage [[Special:MyLanguage/SEP_sesam_Glossary#medium|media]].</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' mediapool||<translate><!--T:89--> Create and administer [[Special:MyLanguage/SEP_sesam_Glossary#media_pool|media pools]].</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|start|init|remove></nowiki>'' mediapoolevent|| <translate><!--T:90--> Create and administer [[Special:MyLanguage/Creating_a_Media_Event|media events]].</translate> 
|-
|sm_cmd migrate||<translate><!--T:91--> Start a migration immediately.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove|start></nowiki>'' migration|| <translate><!--T:92--> Create and administer migration events.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' migrationtask|| <translate><!--T:93--> Create and administer migration tasks.</translate> 
  |-
|sm_cmd ''<nowiki><get|list|add|modify|start|remove></nowiki>'' newdayevent|| <translate><!--T:94--> Create and administer [[Special:MyLanguage/SEP_sesam_Glossary#NEWDAY|NEWDAY events]].</translate>
  |-
  |-
|[[4_4_3_Beefalo:SEP_sesam_CLI#acl|sm_cmd ''<nowiki><get|list|remove|check></nowiki>'' acl]]|| ||Administer ACLs: Reset a user password and list, check or remove ACLs.||  ||
|sm_cmd ''<nowiki><get|list|add|modify></nowiki>'' notification|| <translate><!--T:95--> Create and modify [[Special:MyLanguage/SEP_sesam_Glossary#notification|notifications]].</translate> 
 
|-
|sm_cmd ''<nowiki><get|list></nowiki>'' opersystem||<translate><!--T:96--> List a specific OS or all operating systems.</translate>
|-
|sm_cmd render|| <translate><!--T:97--> Renders the specified template.</translate>
|-
|sm_cmd ''<nowiki><list|restart></nowiki>''|| <translate><!--T:98--> Check and restart backups/migrations.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|restore|start|remove></nowiki>'' restoreevent|| <translate><!--T:99--> Create and administer restore events.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|start|remove></nowiki>'' restoretask|| <translate><!--T:100--> Create and administer restore tasks.</translate> 
|-
|sm_cmd ''<nowiki><get|list></nowiki>'' result|| <translate><!--T:101--> Monitor the results according to set filters (e.g., clients, tasks).</translate> 
|-
|sm_cmd <dir> saveset|| <translate><!--T:102--> Browse a saveset.</translate> 
|-
|sm_cmd ''<nowiki><get|list|add|modify|rename|remove|start></nowiki>'' schedule|| <translate><!--T:103--> Configure and administer schedules.</translate> 
|-
|sm_cmd ''<nowiki><download|show></nowiki>'' services|| <translate><!--T:104--> Monitor and download different files or logs.</translate> 
|-
|sm_cmd list session|| <translate><!--T:105--> List all active sessions.</translate> 
|-
|sm_cmd start ''<nowiki><task|restore|migration|command></nowiki>''|| <translate><!--T:106--> Start an [[Special:MyLanguage/SEP_sesam_Glossary#event|event]].</translate>
  |-
|sm_cmd start report|| <translate><!--T:107--> Create a customized report.</translate>
|-
|sm_cmd ''<nowiki><get|list|add|modify|start|remove></nowiki>'' task||<translate><!--T:108--> Create and administer [[Special:MyLanguage/SEP_sesam_Glossary#task|tasks]].</translate>
  |-
  |-
|sm_cmd list allevent|| |List all events || ||
|sm_cmd ''<nowiki><get|list|add|modify|backup|remove|restart></nowiki>'' taskevent|| <translate><!--T:109--> Create and administer [[Special:MyLanguage/SEP_sesam_Glossary#event|task events]].</translate>
  |-
  |-
|sm_cmd list allevent|| |List all events ||  ||
|sm_cmd add taskgen|| <translate><!--T:110--> Generate tasks according to the specified [[Special:MyLanguage/SEP_sesam_Glossary#task_type|task type]].</translate>
  |-
  |-
|sm_cmd list allevent|| |List all events || ||
|sm_cmd ''<nowiki><get|list|add|modify|start|remove></nowiki>'' taskgroup|| <translate><!--T:111--> Create and administer [[Special:MyLanguage/SEP_sesam_Glossary#task_group|task groups]].</translate>
  |-
  |-
|sm_cmd list allevent|| |List all events ||  ||
|sm_cmd ''<nowiki><get|list|add|modify|remove></nowiki>'' taskgrouprelation|| <translate><!--T:112--> Create and administer task group relations.</translate>  
  |-
  |-
|sm_cmd list allevent|| |List all events ||  ||
|sm_cmd ''<nowiki><download|list></nowiki>'' update||<translate><!--T:113--> Monitor and download JAR (<tt>.jar</tt>) updates.</translate>  
  |-
  |-
|sm_cmd list allevent|| |List all events || ||
|sm_cmd ''<nowiki><get|list|add|modify|remove|reset></nowiki>'' user|| <translate><!--T:114--> Create and administer users.</translate>
  |-
  |-
|sm_cmd list allevent|| |List all events ||  ||
|sm_cmd show version|| <translate><!--T:115--> Display SEP sesam Server and Client package version.</translate>
  |-
  |-
|sm_cmd list allevent|| |List all events ||  ||
|sm_cmd ''<nowiki><resetcbt|check|generate|list></nowiki>'' vsphere|| <translate><!--T:116--> Reset CBT, monitor vSphere environment and generate vSphere task group.</translate>
  |-
  |-
  |}
  |}
 
 
==Administration commands==
<!--
The following are the commands that allow you to execute the administrator’s tasks for SEP sesam.
===Troubleshooting commands===
 
The following are the commands that allow you to troubleshoot the SEP sesam environment.-->
==={{anchor|account}}ACCOUNT (email)===
<translate><!--T:236-->
;Usage: 
<noinclude>===See also===
sm_cmd <get|list|add|modify|remove|send> account [OPTIONS...]
[[Special:MyLanguage/SBC_CLI|SBC CLI]] – <!--[[Special:MyLanguage/Archive:SEP_sesam_sm_Commands|SEP sesam sm Commands]] – -->[[Special:MyLanguage/Useful_SEP_sesam_Commands|Useful SEP sesam Commands]] [[Special:MyLanguage/SEP_sesam_GUI|SEP sesam GUI]]</noinclude></translate>
 
;Description: By using [[4_4_3_Beefalo:SEP_sesam_CLI#action_commands|action commands]] – <tt>get, list, add, modify, remove</tt> – you can get a single email account, list all email accounts depending on list options (listed in main help <tt>sm_cmd help</tt>), create a new email account, modify an existing account or delete the specified account. Additionally,  you can send a message to the given email account and attach multiple local files by using <tt>send mail [OPTIONS...] ID</tt>.
 
==={{anchor|acl}}ACL ===
;Usage:  
sm_cmd <get|list|remove|check> acl [OPTIONS...] ('*' denotes a required parameter)
 
Get a single access control list.
sm_cmd get acl ID
 
List all ACL entries depending on list options which are listed in main help (<tt>sm_cmd help</tt>)
sm_cmd list [LIST OPTIONS] acl
 
Delete the given access control list (ID=all: delete all configured ACLs). 
sm_cmd remove acl ID
 
List all ACL entries of a given user and/or object.
sm_cmd check acl [OPTIONS...]
 
OPTIONS:
    -r [param]  * object origin (i.e. locations, clients, tasks,...)
 
EXTRA OPTIONS:
    -u [param]    user role for which the check is run (admin, restore or operator)
 
;Example:
        > sm_cmd get acl 1
        > sm_cmd list acl
        > sm_cmd remove acl 1
        > sm_cmd check acl -u restore -r Locations 2
        > sm_cmd check acl -u restore -r Tasks SESAM_BACKUP
 
==Configuration commands==
The following are the commands that allow you to configure SEP sesam environment.
 
 
 
 
==Monitoring commands==
The following are the commands that display information about SEP sesam environment.
 
==={{anchor|allevent}}List all events===
;Usage:  sm_cmd list allevent [OPTIONS...]
       
sm_cmd list [LIST OPTIONS] allevent [FILTER OPTIONS...]
  List all events depending on list options in a table format.
 
LIST OPTIONS:
  Listed in main help ("sm_cmd help")
 
FILTER OPTIONS:
 
 
 
Example:
        > sm_cmd list allevent
        > sm_cmd list -C "object,task,schedule" allevent
 
==={{allevent}}List all results===
==Troubleshooting commands==
The following are the commands that allow you to troubleshoot the SEP sesam environment.

Revision as of 15:40, 18 January 2022

Other languages:

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.

Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3 Beefalo/5.0.0 Jaglion. For previous documentation version(s), check documentation archive.


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 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.
Information sign.png 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

Command Description
sm_cmd <get|list|add|modify|remove|send> account Create and administer email accounts.
sm_cmd <get|list|remove|check> acl List or delete access control list (ACL).
sm_cmd list allevent List all SEP sesam events.
sm_cmd list allresult List all results within the specified time period.
sm_cmd backup Start the backup task or the backups of the task group.
sm_cmd clear cache Clear the entire server cach.
sm_cmd <get|list|add|modify|remove> calendar Create and administer calendars.
sm_cmd <get|list|add|modify|remove> calendarevent Create and administer calendar events.
sm_cmd <download|show> calendarsheet Display or download calendar information.
sm_cmd <get|list|add|modify|remove|dir> client Create and administer clients.
sm_cmd <get|list|add|modify|start|remove> command Create and administer commands.
sm_cmd <get|list|add|modify|remove> commandevent Create and administer command events.
sm_cmd <get|list|add|modify|enable|disable|link|unlink|remove> credential Configure and administer credentials.
sm_cmd <download|show> current Display or download the current drive information.
sm_cmd <get|list|add|modify|remove> datastore Create and administer data stores.
sm_cmd <get|list|add|modify|remove> default Configure and administer default keys.
sm_cmd dir <argument> List all specified clients, elements, VMs, etc.
sm_cmd <get|list|add|modify|remove|start|mount|dismount|unload> drive Create and administer drives.
sm_cmd <get|list|add|modify|remove> drivegroup Create and administer drive groups.
sm_cmd <get|list|add|modify|remove> group Create and administer user groups.
sm_cmd <get|list|add|remove> interface Create and administer interfaces.
sm_cmd start inventory Start archive adjustment.
sm_cmd <show|update|report> license Check the SEP sesam license information and update the license.
sm_cmd <get|list|add|modify|remove|load|unload|import|export> loader Create and administer loaders.
sm_cmd <get|list|add|modify|remove> loaderdevice Create and administer loader devices.
sm_cmd <get|list|add|modify|remove> location Create and administer locations.
sm_cmd <download|show|list> log Monitor and download log files from the server.
sm_cmd <get|list|add|modify|remove> media Create and administer storage media.
sm_cmd <get|list|add|modify|remove> mediapool Create and administer media pools.
sm_cmd <get|list|add|modify|start|init|remove> mediapoolevent Create and administer media events.
sm_cmd migrate Start a migration immediately.
sm_cmd <get|list|add|modify|remove|start> migration Create and administer migration events.
sm_cmd <get|list|add|modify|remove> migrationtask Create and administer migration tasks.
sm_cmd <get|list|add|modify|start|remove> newdayevent Create and administer NEWDAY events.
sm_cmd <get|list|add|modify> notification Create and modify notifications.
sm_cmd <get|list> opersystem List a specific OS or all operating systems.
sm_cmd render Renders the specified template.
sm_cmd <list|restart> Check and restart backups/migrations.
sm_cmd <get|list|add|modify|restore|start|remove> restoreevent Create and administer restore events.
sm_cmd <get|list|add|modify|start|remove> restoretask Create and administer restore tasks.
sm_cmd <get|list> result Monitor the results according to set filters (e.g., clients, tasks).
sm_cmd <dir> saveset Browse a saveset.
sm_cmd <get|list|add|modify|rename|remove|start> schedule Configure and administer schedules.
sm_cmd <download|show> services Monitor and download different files or logs.
sm_cmd list session List all active sessions.
sm_cmd start <task|restore|migration|command> Start an event.
sm_cmd start report Create a customized report.
sm_cmd <get|list|add|modify|start|remove> task Create and administer tasks.
sm_cmd <get|list|add|modify|backup|remove|restart> taskevent Create and administer task events.
sm_cmd add taskgen Generate tasks according to the specified task type.
sm_cmd <get|list|add|modify|start|remove> taskgroup Create and administer task groups.
sm_cmd <get|list|add|modify|remove> taskgrouprelation Create and administer task group relations.
sm_cmd <download|list> update Monitor and download JAR (.jar) updates.
sm_cmd <get|list|add|modify|remove|reset> user Create and administer users.
sm_cmd show version Display SEP sesam Server and Client package version.
sm_cmd <resetcbt|check|generate|list> vsphere Reset CBT, monitor vSphere environment and generate vSphere task group.

See also

SBC CLIUseful SEP sesam CommandsSEP sesam GUI