Source:SBC CLI: Difference between revisions

From SEPsesam
No edit summary
No edit summary
Line 41: Line 41:
Backup uses space delimited arguments to specify what will be backed up. These arguments may contain full item names or file patterns.
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> ...] |
  -b <backup_source1> [<backup_source2> ...] |
===–r (restore)===
===–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 [[SESAM_restore_with_sbc_from_diskmedia|SEP sesam restore with SBC from virtual disk]] and [[Sesam_restore_with_sbc|SEP sesam restore with SBC from tape]].
Restore uses space delimited arguments to specify what will be restored. These arguments may contain full item names or file patterns. See also [[SESAM_restore_with_sbc_from_diskmedia|SEP sesam restore with SBC from virtual disk]] and [[Sesam_restore_with_sbc|SEP sesam restore with SBC from tape]].
  -r <restore_source1> [<restore_source2> ...] |
  -r <restore_source1> [<restore_source2> ...] |
===–g (get)===
===–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.  
  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>] |
  -g <remote_file> [<local_file>] |
===–p (put)===
===–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.
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>] |
  -p <local_file> [<remote_file>] |
===–k (kill)===
===–k (kill)===
Kill operation switch sends signal to the SBC process (incl. all child processes).
Kill operation switch sends signal to the SBC process (incl. all child processes).
  -k [-l 1|2|9] -s <saveset_spec>
  -k [-l 1|2|9] -s <saveset_spec>
===–h (help)===
===–h (help)===
Displays abbreviated usage syntax and a list of options you can use with the sbc command.
Displays abbreviated usage syntax and a list of options you can use with the sbc command.
Line 58: Line 63:


==Options==
==Options==
===–a ===
===–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.
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>]
[-a <DB_options>]
===–C===
 
===–C (control host)===
Specifies control host – SEP sesam Server.
Specifies control host – SEP sesam Server.
  -C <control_host>
  -C <control_host>
===–d===
 
===–d (device)===
Specifies the target/source device or directory for the operation.
Specifies the target/source device or directory for the operation.
  -d <device>
  -d <device>
===–f===
 
===–f (files)===
  -f <list_source>
  -f <list_source>
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 lenght for task source (max. 1024 characters). 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. For example, the file ''C:/sesam/backup_file_list.txt'' includes the following entries:<br />
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 lenght for task source (max. 1024 characters). 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. <br />For example, the file ''C:/sesam/backup_file_list.txt'' includes the following entries:<br />
<code>/lib<br />
<code>/lib<br />
/usr/share<br />
/usr/share<br />
Line 75: Line 83:
/var/opt/sesam/var/ini</code>
/var/opt/sesam/var/ini</code>


The option –f requires fully qualified file list or directory name, e.g., ''C:/sesam/backup_file_list.txt'' (recommended), or the list must be located in the {{path|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''.
The option –f requires fully qualified file list or directory name, e.g., ''C:/sesam/backup_file_list.txt'' (recommended), or the list to be located in the {{path|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''.
{{note|The option –f behaves differently on different platforms:
{{note|The option –f behaves differently on different platforms:
*On Windows, the <tt>-f <list_source></tt> option overrides the backup source specified in the [[Standard_Backup_Procedure#Step_1:_Creating_a_backup_task|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 Windows, the <tt>-f <list_source></tt> option overrides the backup source specified in the [[Standard_Backup_Procedure#Step_1:_Creating_a_backup_task|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, the source g:\x and the data from the ''backup_file_list.txt'' are considered for backup.}}
*On Unix/Linux both, the source ''g:\x'' 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, ''C:/sesam/backup_file_list.txt'') and entered again with a –f switch in the ''Save options'' field: ''-f C:/sesam/backup_file_list.txt''. }}
 
===–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: [[Special:MyLanguage/SEP_sesam_Glossary#FULL|FULL]], [[Special:MyLanguage/SEP_sesam_Glossary#DIFF|DIFF]], [[Special:MyLanguage/SEP_sesam_Glossary#INCR|INCR]] and [[Special:MyLanguage/SEP_sesam_Glossary#COPY|COPY]].
  "c[opy]" | "f[ull]" | "i[ncr]" | "d[iff]"
For restore, the available restore types are [[Special:MyLanguage/SEP_sesam_Glossary#complete_restore|complete (full) restore]], [[Special:MyLanguage/SEP_sesam_Glossary#selective_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.
 
{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
    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
 
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 [[Special:MyLanguage/SEP_sesam_Glossary#ACL|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 [[SESAM_restore_with_sbc_from_diskmedia|SEP sesam restore with SBC from virtual disk]] and [[Sesam_restore_with_sbc|SEP sesam restore with SBC from tape]].
 
-o skip_adat
Specifies to exclude [[SEP_sesam_Glossary#ADS|ADS]] from backup or restore. For details, see
[[Special:MyLanguage/Support_for_NTFS_alternate_data_streams_(ADS)_for_Windows|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 [[SBC_CLI#.E2.80.93C (control host)|–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 [[SBC_CLI#SBC_CLI#.E2.80.93d (device)|–d]].
–t <tape_spec>
 
===–T (time)===


== See also ==
== See also ==
[[Special:MyLanguage/FAQ#SBC|How can I set the SBC so that the exclude list always uses the file pattern (?,*) instead of using regular expressions?]] – [[SEP Sesam CLI]] – [[Special:MyLanguage/SEP sesam GUI|SEP sesam GUI]]
[[Special:MyLanguage/FAQ#SBC|How can I set the SBC so that the exclude list always uses the file pattern (?,*) instead of using regular expressions?]] – [[SEP Sesam CLI]] – [[Special:MyLanguage/SEP sesam GUI|SEP sesam GUI]]

Revision as of 18:23, 23 November 2016

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.

Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.
Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3. For previous documentation version(s), check documentation archive.


Overview

The SEP sesam SBC (sesam backup client) 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. The SBC module can be controlled directly without other SEP modules by using SBC CLI (command line interface).

SBC CLI is used to back up and restore data locally on the host. 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 backup type, OS and platform.

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
Indicates optional values.
< > less than and greater than symbols
Encloses variables that require values.

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 SEP sesam restore with SBC from virtual disk and SEP sesam restore with SBC from tape.

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

-f <list_source>

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 lenght for task source (max. 1024 characters). 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 (recommended), 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 g:\x 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, C:/sesam/backup_file_list.txt) and entered again with a –f switch in the Save options field: -f C:/sesam/backup_file_list.txt.

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

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

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 SEP sesam restore with SBC from virtual disk and SEP sesam restore with SBC from tape.

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

See also

How can I set the SBC so that the exclude list always uses the file pattern (?,*) instead of using regular expressions?SEP Sesam CLISEP sesam GUI