SBC CLI

From SEPsesam
Jump to: navigation, search

Copyright © SEP AG 1999-2018. 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.

Draft.png WORK IN PROGRESS
This page is a draft. Treat the information on this page with caution as it may be incomplete.
Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3. For previous documentation version(s), check documentation archive.


Overview

SEP sesam provides both, GUI and CLI interfaces to manage SEP sesam environment (CLI) or individual client (SBC). SEP sesam command line interface provides two CLI components: administration utility SEP sesam CLI and client utility SBC CLI.

  • SEP sesam CLI provides an alternate way of managing SEP sesam environment. 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. For details, see SEP sesam CLI.
  • SBC CLI is used to back up and restore data locally on the host. SEP sesam SBC (sesam backup client) is a component that collects and consolidates the backup data on the client system, and delivers it to STPD. During a restore, SBC receives the required data and restores it to the target system. SBC CLI enables users to control, backup and restore the SEP sesam client (SBC module) directly and independently from other SEP sesam modules.

Command conventions

The parameters for a command are order-dependent and might include mandatory and optional values, or keyword choices.

| 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.

SBC CLI usage

sbc -b|r|g|p|k|h [-a <DB_options>][-C <control_host>] [-d <device>]
                [-f <list_source>] [-F <data_format>] [-i <saveset_info>]
                [-j <job_name>] [-l <level>] [-L <control_target>]
                [-n <segment>[:<offset>:<size>]] [-o {options}]
                [-O <STOR/RETR_direct>] [-P <PID>] [-R <restore_target>]
                [-s <saveset_spec>] [-S <storage_node>] [-t <tape_spec>]
                [-T <since_time>] [-x <exclude_regexp>] [-X <exclude_list>]
                [-v 0|1|2|3|4|5|6]

Commands

There are six main commands that define what action can be performed by SBC. Another set of options can be used to further define the way the command is performed. The main commands are:

sbc -b|r|g|p|k|h

-b (backup)

Backup uses space delimited arguments to specify what will be backed up. These arguments may contain full item names or file patterns.

-b <backup_source1> [<backup_source2> ...] |

-r (restore)

Restore uses space delimited arguments to specify what will be restored. These arguments may contain full item names or file patterns. See also Restore from tape via SBC without a valid SEP sesam database.

-r <restore_source1> [<restore_source2> ...] |

-g (get)

Get operation switch transfers the specified file from SEP sesam Server work directory to local directory. File is received as is, without any formatting. If local file is not specified, the remote file name is used. 
-g <remote_file> [<local_file>] |

-p (put)

Put operation switch transfers the specified file to SEP sesam Server work directory. File is sent as is, without any formatting. If remote file is not specified, the local file name is used.

-p <local_file> [<remote_file>] |

-k (kill)

Kill operation switch sends signal to the SBC process (incl. all child processes).

-k [-l 1|2|9] -s <saveset_spec>

-h (help)

Displays abbreviated usage syntax and a list of options you can use with the sbc command.

-h

Options

-a (backup type argument)

Backup type specific argument that may be passed to the underlying library. The -a <DB_options> are forwarded to the related database module , e.g., to Lotus Notes.

-a <DB_options>

-C (control host)

Specifies control host - SEP sesam Server.

-C <control_host>

-d (device)

Specifies the target/source device or directory for the operation.

-d <device>

-f (files)

Specifies the list of items to be backed up. Typically, this option is used when the number of files or directories to be included for backup exceeds allowed length for task source (SEP sesam version ≥ 4.4.3: max. 1024 characters; ≤ 4.4.2: max. 255 characters).

-f <list_source>

It is recommended to create a separate file that contains a list of selected files and directories to be backed up, one entry per line. Note that wildcards are not supported.
For example, the file C:/sesam/backup_file_list.txt includes the following entries:
/lib
/usr/share
/usr/bin/a2ps
/var/opt/sesam/var/ini

The option -f requires fully qualified file list or directory name, e.g., C:/sesam/backup_file_list.txt on Windows or -f etc/sesam/backup_file_list.txt on Linux, or the list to be located in the SESAM_BIN/bin/sesam. To enter the file in the backup task properties, create or open the backup task, select the Options tab and under the Additional call arguments in the Save options field, enter the specified file in the form: -f C:/sesam/backup_file_list.txt.

Information sign.png Note
The option -f behaves differently on different platforms:
  • On Windows, the -f <list_source> option overrides the backup source specified in the backup task. For example, creating a backup task with source g:\x and specifying an SBC option -f C:/sesam/backup_file_list.txt will back up only the data from the backup_file_list.txt while ignoring the directory g:\x, which was specified as a backup source.
  • On Unix/Linux both, the source and the data from the backup_file_list.txt are considered for backup. It is therefore recommended that the specified <list_source> file is specified as a source in the Source field (to be included in the backup set, for example, etc/sesam/backup_file_list.txt) and entered again with a -f switch in the Save options field: -f etc/sesam/backup_file_list.txt.
See also How do I include or exclude a large number of files for backup.

-F (format)

Data stream format (valid for backup and restore operations) can be: default "mtf" for Windows SBC, default "cpio" for UNIX SBC, or "sidf" or "none" for Novell sbc_smdr.

-F <data_format>

-i (info)

If specified, the descriptive additional information for the given save set is saved together with data during backup. Relevant only for backup, not considered for restore.

-i  <saveset_info>

-j (job)

Specifies backup task name.

 -j <job_name>

-l (level)

Specifies backup or restore level type.

-l <level>

For backup, the available backup level types are: FULL, DIFF, INCR and COPY.

 "c[opy]" | "f[ull]" | "i[ncr]" | "d[iff]"

For restore, the available restore types are complete (full) restore, selective restore or list. The "l[ist]" parameter only lists the names of the incoming items in the log file.

"f[ull]" | "s[elecive]" | "l[ist]"

-n (number)

Optionally, this number can be used for restore with optional <offset> and <size> arguments to start a restore at specified offset and end when reaching the specified size (restored data size).

-n <segment_number> | -n <segment_number>[:<offset>:<size>]

-o (options)

Specifies additional options for backup and restore. You can set SBC options in the backup task properties: Click the Options tab and under the Additional call arguments (Expert options) in the Save options field, specify the required options. The available SBC options depend on the selected operation, backup type, OS and platform.

SBC Windows:

{options}: comma separated list of
   compress                         # with compression
   exclude_match=pattern|regexp     # exclude matching, default: pattern
   encrypt={encrypted_passwd}       # en/decrypt with encrypted passwd
   encrypt_plain={passwd}           # en/decrypt with passwd
   locale={locale like bgr_BGR}     # set locale for backup/restore_sources
   skip_acl                         # process only data (no ACL)
   skip_adat                        # skip alternate data streams
   skip_data                        # process only ACL
   skip_reparse                     # skip reparse point streams
only for backup:
   add_archive_ready                # add files with archive bit
   clear_archive                    # clear archive bit after backup
   [no_]hardlink_data_single        # handling of hardlink's data
   [no_]sparse                      # handling of sparse file data
   excl                             # exclude folders with 'nosbc' (default)
   noexcl                           # ignore 'nosbc'
   follow                           # follow reparse points
   ignore_vss_access_denied         # item not accessible: end with warnings
   skip_sbc_exclude                 # skip sm.ini [SBC_EXCLUDE] ExcludePattern#
   verify                           # verify data after backup
only for restore:
   break_on_error                   # abort after 1st error
   next                             # start from subsequent media
   overwrite                        # overwrite if file exists
   over=new, over=old               # overwrites newer/older files
   plain                            # restore plain in target dir
   tree                             # restore with subdirectories
   rename                           # rename if file exists
   show_not_processed               # log not processed item in level -v 0


SBC Linux/UNIX:

 {options}: comma separated list of
                    compress, encrypt[_plain]=[{aes}|{bf}]<passwd>
                    noacl                 # process without ACL (Trustees)
only for backup:    verify                # verify data after backup
                    plain                 # do not descend into subdirectories
                    hard=defer            # defer hardlinks
                    hard=sort             # expect i-node sorted input
                    ignore_finderr        # ignore errors from sbc_find
only for restore:   rename, overwrite     # rename/overwrite if file exists
                    over=new, over=old    # overwrites newer/older files
                    plain, tree           # restore plain/tree in target dir
                    next                  # start from subsequent tape

The following list provides some of the most used options. Note that some of the options might be platform/OS dependent and thus not available on all clients.

 -o <acl|noacl>

Specifies whether the ACLs will be backed up and restored.

-o over | -o over=newer|older

Specifies to overwrite existing files during restore. This command can use additional arguments to define to overwrite exiting files if the files from the save set are older OR newer than the files on disk. See also Restore from tape via SBC without a valid SEP sesam database.

-o skip_adat

Specifies to exclude ADS from backup or restore. For details, see Support for NTFS alternate data streams (ADS) for Windows.

-P (process)

Specifies a process ID number for the the kill command. If this switch is provided, a process with specified PID will be terminated.

-p <PID>

-R (restore target)

Specifies restore target directory when restoring to a new location (relocation)

 -R <restore_target>

-s (save set)

Specifies the used save set for backup (with -b switch), restore (with -r switch) or for terminating the operation with the specified save set's name by kill opeartion (with -k switch).

 -s <saveset_name>

-S (storage host)

Specifies SEP sesam storage host (SEP sesam Server or RDS). See also -C.

-S <storage_node>

-t (tape)

Specifies the tape to be used for the respective operation on remote SEP sesam storage node. It is required when SESAM media server is involved. See also -d.

-t <tape_spec>

-T (time)

Specifies time: By using this switch only files created or modified after the specified time will be processed. Time format is “YYYYMMDDHHMMSS”. The -T switch has higher priority than "-l <level>" switch, therefore the backup "COPY" level type is applied to all files matching the specified time.
If specified with kill functionality, it will be used as timeout specified in seconds.

<time>

-x (exclude regex)

Specifies regular expression exclusions for backup. For details, see Exclude with Regular Expressions.

 -x <exclude_regexp> 

-X (exclude list)

Specifies the list of items to be excluded from backup.

-X <exclude_list>

Typically, this option is used when the number of files or directories to be excluded for backup exceeds allowed length for exclude list (max. 1024 characters). It is recommended to create a separate file containing list of regular expressions, one entry per line. Note that wildcards are not supported. The option -X requires fully qualified exclude list or directory name, e.g., C:/sesam/exclude_list.txt

To enter the exclude file in the backup task properties, create or open the backup task, select the Options tab and under the Additional call arguments in the Save options field, enter the specified file in the form: -X C:/sesam/exclude_list.txt. For details and other exclude methods, see Creating exclude list. See also How can I set the SBC so that the exclude list always uses the file pattern (?,*) instead of using regular expressions?

See also

Creating exclude listHow can I set the SBC so that the exclude list always uses the file pattern (?,*) instead of using regular expressions?Restore from tape via SBC without a valid SEP sesam database