NSRSYBSV(8)

NAME
nsrsybsv - save Sybase databases to long term storage with NetWorker

SYNOPSIS
nsrsybsv [ -CEGRThvq? ] [ -U user-name ] [ -P password ] [ -s server ] [ -c client-name ] [ -N SYBASE:/sql-server-name[ /database-name ] ] [ -b pool ] [ -g group ] [ -l level ] [ -W width ] [ -D debug-level ] SYBASE:/sql-server-name[ /database-name ]

DESCRIPTION
nsrsybsv saves Sybase SQL Server databases to the NetWorker server (see nsr(8)). The progress of a nsrsybsv can be monitored using the X Window System based nwadmin(8) program or the curses(3X) based nsrwatch(8) program for other terminal types.

The database(s) to be saved are specified by the SYBASE:/sql-server-name[/database-name] value. The database-name is optional; if omitted, all databases on the SQL Server will be saved except the tempdb database.

The user-name and password provide the information necessary to log in to the SQL Server to be backed up. The user-name must have sufficient permissions to perform database dumps on the databases to be saved. If the user-name and password are not supplied, the name, client-name, group, and server are used to query the client resource defined on the server for the user-name and password.

Each database saved is created in its own save stream. If all databases on the SQL Server are saved, there will be a save stream for each database and a save stream for the SQL Server. This stream of data is sent to a receiving process (see nsrd(8)) on the NetWorker server, which will process the data, adding entries to the on-line index (see nsrindexd(8)) for each database, with the data finally ending up on some long term storage media (see nsrmmd(8)).

When command line backups are run, the client index (and bootstrap for the server) are not automatically saved. Scheduled backups save these automatically, which ensures that disaster recovery takes the minimum time possible. If command line backups are run, the savegrp(8) command should be used with the "-O" option to save the client index and server bootstrap. This will ensure that recovery from a catastrophic failure can occur in the most expedient fashion.

Details about handling media are discussed in nsrmm(8) and nsr_device(5).

OPTIONS

-C  Use client-side compression for this save. Compression is not used by default.

-E  Use encryption for this save. Encryption is not used by default.

-G  Perform a dump with the NO_LOG options. This option is not used for normal backups, but may be necessary in cases where there is a device failure or full log device.

-R  Do not truncate the transaction log for the database after this backup. The transaction log is normally truncated after each backup for all databases. When this option is used, the transaction log is left intact. This is useful for backing up a database when there has been a device failure.

-T  Truncate the transaction log but do not perform a backup. This is not normally used, but it can be useful once the transaction log has filled. This command should be followed by a full backup in order to ensure the database can be restored.

-h  Display usage.

-v  Verbose. Cause the nsrsybsv program to tell you in great detail what it is doing as it proceeds.

-q  Quiet. Display only summary information and error messages.

-U user-name
    Specify the SQL Server user that will perform the backups.

-P password
    Specifies the password for the SQL Server user that will perform the backups.

-s server
    Specify which machine to use as the NetWorker server.

-c client-name
    Specify the client name for starting the save session. This is useful on clients with multiple network interfaces, and hence multiple host names. It can be used to create multiple index databases for the same physical client. Note that this does not specify the network interface to use. This is specified in the server network interface attribute of the client resource (see nsr_client(5)).

-N SYBASE:/sql-server-name[ /database-name ]
    The symbolic name of this save set. By default, the name of the database is used for the name (SYBASE:/sql-server-name/database-name.)

-b pool
    Specifies a particular destination pool for the databases and transaction logs.

-g group
    This option is used by savegrp(8) and savefs(8) to denote the group of the save (see nsr_client(5) and nsr_group(5)) and is used by the NetWorker server to select the specific media pool.

-l level
    The level of the save. This option is used by savegrp(8) and savefs(8) to specify a particular level for a scheduled save. Valid levels are "incr" and "full". The default level is "full". A full backup is a backup of the entire database. An incremental backup is a backup of the database's transaction log and is only available when the transaction log is on its own device.

-W width
    The width used when formatting summary information output.

ENVIRONMENT VARIABLES

-D debug-level
    Set the NSR_DEBUG_LEVEL for this command. Valid values range from 0 (no information) to 10 (much information.) The default value is 2.

SYBASE
    The SYBASE environment variable must have the path to the Sybase SQL Server interfaces file. This has no default value, but if if is not set, Sybase attempts to find the interfaces file in the user's home directory.

PRECMD
    The PRECMD environment variable contains a command to execute before the database is backed up. If the PRECMD exits with a non zero return code, the database will not be backed up. The default value for the PRECMD is no command if nsrsybsv is executed from the command line. If a scheduled backup initiates nsrsybsv, then the default PRECMD is a consistency check of the databases to be backed up.

POSTCMD
    The POSTCMD environment variable contains a command to execute after the database is backed up. The POSTCMD is always executed, even if the PRECMD returns a result of 1. The default value for the POSTCMD is no command.

EXAMPLES

Backing up a database:
    To back up database model in SQL Server "production" to NetWorker server networker, enter the following command:
    nsrsybsv -U sa -P password -s networker SYBASE:productionmodel

Backing up an entire SQL Server:
    To back up all databases (except tempdb) in SQL Server "production" to NetWorker server networker, enter the following command:
    nsrsybsv -U sa -P password -s networker -l full SYBASE:production

Backing up a transaction log:
    To back up the transaction log for database "orders" in SQL Server "production" to NetWorker server networker, enter the following command:
    nsrsybsv -U sa -P password -s networker -l incr SYBASE:productionorders

SEE ALSO
curses(3X), nsr_getdate(3), nwadmin(8), nsr(5), nsr(8), nsr_client(5), nsr_device(5), nsr_group(5), nsr_service(5), nsrd(8), nsrim(8), nsrindexd(8), nsrmm(8), nsrmmd(8), nsrsyb(8), nsrsybcc(8), nsrsybrc(8), nsrwatch(8), recover(8), savefs(8), savegrp(8)

DIAGNOSTICS

  Exit Codes
0   Normal exit. This means that a save set was correctly created on the server.
1   Abnormal exit. A save set was not correctly created on the server.

  Messages
This is a partial listing of common error messages. Refer to the Administrator's Guide for more complete listing of error messages and how to resolve them.

host: saveset   level=level,  size   time  count files.
    This message (with the appropriate client host name, saveset name, level, total save set size, elapsed time, and file count) is printed whenever nsrsybsv is run by savegrp(8) and exits normally.

The context allocation routine failed...
    Cannot access file /sybase/config/objectid.dat This message indicates that the $SYBASE environment variable was not set. This environment variable needs to be set so that nsrsybsv can find the Sybase localization files required at runtime. The $SYBASE environment variable should be set to the directory where Sybase was installed (the one where the interfaces file is.) This error may also appear if the Sybase Open Client software is not installed. Sybase Open Client must be installed for nsrsybsv to run.

Archive API error...Unable to open API library for device...
    Library path is /sybase/lib/libbms.ext This message indicates that the symbolic link to the libbms.ext library is missing from the $SYBASE/lib directory. Make sure the link exists. The libbms.ext file to link to is in the same directory as the NetWorker binary files.

Archive API error...Attempting to open byte stream device...
    network error (Severity 5 Number 22): volume pool not found This message indicates that the backup attempted to write to a volume pool that does not exist on the NetWorker server. Check the server to see which pools are defined and try to backup to an existing pool.

Archive API error...Attempting to open byte stream device...
    network error (Severity 5 Number 12): Business Suite Module for Sybase has not been properly enabled. This message indicates that the server to which your backups are directed is not enabled for Sybase backups. Install an enabler for the Sybase backup product on the server and retry the operation.

Archive API error...Attempting to open byte stream device...
    network error (Severity 5 Number 13): client is not a registered client This message indicates that the client on which the backup is being run is not a registered client of the server to which the backup is directed. Create a client resource for this client on the server and retry the operation.

Archive API error...Attempting to open byte stream device...
    network error (Severity 5 Number 13): no group group configured on server This message indicates that the group supplied on the command line is not defined in the server to which the backup is directed. Check the group name supplied to make sure it exists on the server. nsrsybsv does not require a group name, so the command may be retried without specifying a group name.

Error from server: Msg number, Level number, State number
    Error text This message indicates that there was an error message returned from Sybase. Refer to the Sybase Troubleshooting and Errors Guide for an explanation of the error and its resolution.