(C)SEP AG

Copyright 1999-2011 by SEP AG. 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.


Contents

Introduction

The SEP sesam command line interface (SEP sesam CLI) is used to install and configure a SEP sesam environment automatically with any GUI. This CLI is integrated in the SEP sesam server from version 3.6 and higher. 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


Attention: Recommendations for using the SEP sesam Command Line Interface (CLI)

When using the optional Command Line features of SEP sesam commands are written directly to the SEP sesam database.

The commands are immediately acted upon by SEP sesam once the <Enter> key is pressed. Therefore, there is no chance to correct or change an entry, which is possible when using the SEP sesam GUI.

For this reason it is extremely important to follow a specific and defined plan when using the command line to prevent a user caused system failure in the backup environment. Such a mistake is not to be underestimated – a wrong or mistaken entry can lead to complete data loss or other damage to the database.

Unchecked or unverified command line entries should be avoided!

Such mistakes can void the warranty offered by your SEP sesam licensing agreement.

Before you start with scripting with the SEP sesam CLI you should acquire basic knowledge about the SEP sesam environment. First study the User Guide and the Administrator guide and work with a SEP sesam installation to get experience how the SEP sesam objects work together. Alternatively, use the seminar offers from SEP AG to learn the main structure of the functions and configuration of the SEP sesam. After that you're ready to start working with the SEP sesam CLI and write your first scripts.

CLI example

CLI example

Before you start reading the syntax description it could be helpful to have a look at a small SEP sesam CLI example for creation of a new SEP sesam environment by SEP sesam CLI.




Using the SEP sesam Command Line Interface

The following chapter describes the use of the object items of the SEP sesam CLI. There are mandatory and optional options. Mandatory options are designated by an asterisk (*). At the end of each object section there are one or more examples on how to use the command.

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


Attention: Global Deletion

With "Global Deletion" it's possible to delete a client or task with all dependent or related objects. That means if you want to delete a client you can delete all of its appropriate tasks at the same time. For example, if you delete a task during this process it will be removed from its task groups and task events. "Global Deletion" is available for client and task. You can enforce that 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 the parameter Force. First remove the loader or drive and then re-start the client/task deletion.


Syntaxes

CLI main call

Usage:

Parameters:

Commands:

Commands for drive only:

Commands for loader only:

Objects:

Example:

Output:

All INFO messages are written to standard error. They can suppressed by redirecting stderr to /dev/null.




Displaying SEP sesam DB data

The content of the SEP sesam DB concerning several actions can be displayed with the parameter list or sql.

Options:

  • -d: Delimiter \t = TAB (default)
  • -F: Output format (default: header)

Examples:

The delimiter parameter is only valid with specific formats. Some usage examples follow:

  • Output with column delimiter "|" (pipe) with different header

Command:

Output:

Command:

Output:

Command:

Output:

Here are some examples for the different format (-F) values:

  • Standard display without format parameter

Command:

Output:

  • Hide the column header

Command:

Output:

  • Display the column header in a special form (header=value)

Command:

Output:

  • Output the data as SQL DML command (insert)

Command:

Output:

You can use this output to create datasets manually, e.g.



Topology

Location

After the installation of a new SEP sesam server a standard location - named Local - is created. You can use this default location to add your clients or create your own locations as desired.

Usage:

If 'ID' is set to 'auto' SEP sesam will generate it automatically.

Options:

Example:


Client

Right after the installation of a new SEP sesam Server the SEP sesam server client object already exists. You have to register your backup clients in the SEP sesam environment before you can use them. If you add clients with the SEP sesam GUI during the registration process the SEP sesam Server checks if the client is visible/reachable to him. This is different with the SEP sesam CLI and therefore it's recommended to check the client availability by starting a small backup task after adding it (client).

Usage:

Options:


Attention: Global Deletion

If an object is removed by using the "-F YES" option all other objects (e.g. tasks) that depend on it are removed as well.


For backup clients in a Novell environment the following options are necessary to work properly.

Options for 'NetWare':

Example:


Interface

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

Usage:

Options:

Example:


Tape Library (Loader)

This section will instruct you on how to configure your loader hardware.


Attention: Using loader slots

You cannot use export or mail slots for backup. You can move media between them but backup jobs will only work with normal slots in the library.


Usage:

Options (add|modify|remove)

Options (load,unload,import|export):

  • load: move a tape from a slot (-s) the a drive (-d)
  • unload: move a tape from a drive (-d) to a slot (-s)
  • import: move a tape from an export or mail slot (-p) to a drive (-d)
  • export: move a tape from a drive (-d) to an export or mail slot (-p)

Options (import|export):

Options (load|unload):

Example:


Loader Device

Here you configure your loader devices.


Attention: Add loader device

The loader number of the loader device must exist in hwloaders.


Usage:

Options (add|modify|remove)

Example:


Drive group

Every drive must be a member of a drive group. Therefore, drive group has to be created before adding a drive.

Usage:

Options:

Example:


Drive

After creating drive groups you can add your drive 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, you can use the parameter -o noconfig. The drive configuration will only be written into the SEP sesam database. To use the drive for SEP sesam operation you must first execute the sm_config_drives command manually.

Usage:

Options:

Options for Action REMOVE:

Example:


Mediapool

The number of necessary mediapools depends on your planned backup and media strategy.

Usage:

Options:

Example:


Media

Usage:

Options (add):

Options (modify):

Example:


Inventory

Usage:

Options:

Example:



Tasks

Task

Usage:

Options (add|modify):

Example:

Options (start):

Example:


Taskgroup

Usage:

Options:

Example:


Taskgroup relation

You can combine several tasks to task groups.

Usage:

Options:

Example:


Migration task

Usage:

Options:

Filter options:

Just one of the following 4 filter options can be set.

Example:


Restore task

Usage:

Options:

Example:


Command task

Usage:

Options:

Example:


Restart Task

Usage:

Options:

Parameter '-s' (saveset) can contain several savesets divided by comma

Example:



Schedules & Events

Schedule

If you want to execute your backups on a specific time table you have to create tasks first. Then you must create a schedule and add the task and the schedule to a backup event. There are different event types to connect to a schedule (see below).

Usage:

Options:

Example:



Task event

Usage:

Options:

If ID is set to 'auto' SEP sesam creates a unique ID.

Example:


Migration event

Usage:

Options:

Example:


Restore event

Options

Examples:


Command event

Usage:

Options:

If ID is set to 'auto' SEP sesam creates an unique ID.

Example:


Media event

Usage:

Options:

If ID is set to 'auto' SEP sesam creates a unique ID.

Example:



Shortcuts

CLI commands often used are also accessible through CLI shortcuts. The advantage is that the CLI command is shorter and the required parameter dependent on shortcut type will be set automatically.

Example to show the difference between default cli usage and cli with shortcut usage: default :

shortcut:


Following Examples show all available shortcuts:

Init Media Pool:

Init Media:

Start Backup

Start Backup Group

Start Restore Task

Start Migration Task

Additional features

Send email

Create an account

Usage:

Options:

Example:


Send an email

Usage:

Options:

If the account name is 'NONE' the parameters <-t, -f, -h> are mandatory.

Example:


Update GUI

Usage:

Options:


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. Therefore an incorrect use (update or delete) can destroy the SEP sesam database! Please be EXTREMELY careful when using a SQL command directly.


Usage:

Example:

Format outputs of 'SELECT' SQL queries



Errorcodes

In case of an error the CLI returns a specific error code which describes the error type.

See the following list of error codes:

Error Code Error Type
2 CLIException
3 SQLException
4 NumberFormatException
5 RemoteException
6 FileNotFoundException
7 IOException
8 InvocationTargetException
9 unknown Exception




Syntax examples

Construct a backup event

Location
Create a new Location SEP-MUNICH with a Location-ID=33.

Backup client
In the next step a new Linux backup client with the hostname lx01 will be registered and assigned to the location SEP-MUNICH.

Backup task
Create two backup tasks for client lx01 with the backup sources /etc and a complete backup of the local machine without the directory /tmp.

Schedule
Create two new schedules. One for backups on every day of a week at 10 p.m. and the second for backup on every Sunday at 9 p.m.

Events for the schedules
After the creation of the schedules the backup tasks will be combined with the schedules to backup events.

  • On every Sunday a full backup of the backup task lx01_etc to the mediapool WEEK will be executed with priority 2.

  • On other days the backup task lx01_etc will be executed as a differential backup to the mediapool 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.

  • Sundays a full backup of the task lx01_all will be executed as copy backup to the mediapool WEEK.

Request Call

Our sales team would be happy to assist you!

Download

SEP 30-day Trial

You must login or use current login to download the FREE trial.

Media Library

Browse and discover videos by SEP.