Swstbackup_sqlsvr and swstrestore_sqlsvr are used in the backup operation of an SQL Server by the backup management function.
NAME
swstbackup_sqlsvr - backup of SQL Server databases
SYNOPSIS
<program-directory>\bin\swstbackup_sqlsvr [-Xserver Server-Name] [-Xinstance Instance-Name] [-Xdevmap Device-Map-File] [-suspend|-T] DB-Name-1 DB-Name-2,,,DB-Name-i
DESCRIPTION
This command backup SQL Server databases. The command, in cooperation with SQL Server, performs a copy of data on the target database volumes on to backup volumes by executing swstbackup (Backup execution command).
When swststartsync (Backup synchronous processing start command) is executed in advance of the backup synchronous processing and the "Chapter 5 Backup Operation using Suspend/Resume Function" is used for synchronous high-speed backup, execute the backup command with -suspend specified and suspend the backup synchronous processing.
The database backup history information will be stored in msdb of SQL Server. The database volume backup history information will be stored in the management files of AdvancedCopy Manager.
OPTIONS
Specifies the virtual server name of a connected SQL Server in the case of cluster operation. In the case of operation without cluster, this option need not be specified.
Specifies a connection instance. Specify an instance name in the operand. If this option is not specified, connection will be made to the default instance.
Specifies performing the backup to a specified backup volume. Specify a device map file name that describes combinations of database volumes and destination backup volumes. If this option is not specified, the target backup volume will be automatically selected. Specify a device map file name by using an absolute pathname.
This results in synchronous high-speed backup using the "Chapter 5 Backup Operation using Suspend/Resume Function".
Specifies that the differential snapshot high-speed backup is to be executed.
This option cannot be specified during synchronous processing.
This option is valid only for copying within a box when the ETERNUS Disk storage system supports the QuickOPC function.
For snapshot high-speed backup without specifying this option, ordinary snapshot processing (i.e., OPC without using the QuickOPC function) is started. This option must always be specified to perform a backup operation using differential snapshots.
OPERANDS
Specifies database names. Delimit by a single blank or the tab character and specify the database names when you specify two or more databases. No more than 64 database names can be specified.
EXIT STATUS
=0: Completed successfully
>0: Terminated abnormally
EXAMPLES
Backup the databases DB01, DB02, and DB03 of virtual server VSERVER. (Assume that the logical node name of AdvancedCopy Manager is nodeAGT.):
C:\>set SWSTGNODE=nodeAGT C:\>C:\Win32App\AdvancedCopyManager\bin\swstbackup_sqlsvr -Xserver VSERVER DB01 DB02 DB03 DB01 DB02 DB03 swstbackup_sqlsvr completed C:\>
Backup the databases (DB01, DB02 and DB03) specifying the destination backup volumes by the device map file (G:\STGADM\devmap.txt):
C:\>set SWSTGNODE=nodeAGT C:\>C:\Win32App\AdvancedCopyManager\bin\swstbackup_sqlsvr -Xserver VSERVER -Xdevmap G:\STGADM\DEV.map DB01 DB02 DB03 DB01 DB02 DB03 swstbackup_sqlsvr completed C:\>
NOTES
You cannot perform backup in the following cases:
A specified database does not exist (This includes the case where neither the virtual server nor the instance exist).
In the case that two or more databases are specified, not all of the specified databases are databases of the same instance (In the case where -Xinstance option is not used, the processing is done to the default instance. In the case where -Xinstance option is used, the processing is done to the specified named instance).
A volume where the specified database is placed is not registered as a transaction volume.
Backup policy is not set for a database volume to be backed up.
A backup that was executed one generation earlier was unsuccessful.
Restore is being performed using backup history information that will cause a generation overflow.
No unused backup volume could be found for use as the copy destination.
A drive letter has been assigned to a backup volume to be used as the copy destination.
The synchronous processing between the database volumes and the backup volumes is not in equivalency maintenance state.
After operation has begun, any of physical information (i.e., the box identifier, OLU number, EXTENT start position, or EXTENT size) of a volume has been changed.
If a database volume is an SDX object (SynfinityDISK), the state of the SDX object is not in the following states:
The mirror volume is ACTIVE or STOP.
The mirror slices are ACTIVE or STOP.
The state of SDX Disk is ENABLE.
65 or more databases have been specified.
A backup volume could not be locked
The backup volume locking specification file for backups is invalid
You cannot specify a destination backup volume and perform backup if:
The backup volume specified in a device map file cannot be used as the destination backup volume for a corresponding database volume. In other words, not all the following conditions are met:
The specified backup volume is unused.
The database volume and the backup volume have the same partition size.
The description on a target database volume of the device map file has an error.
If this command is executed during the execution of snapshot processing, stop the copy processing that is in progress and start the snapshot processing again.
This command backup two or more databases at the same time by specifying the operand. When, for example, two or more databases exist on one partition, or physical files of multiple databases exist together on volumes, perform the backup of all the databases which exist on the volumes by using this function.
This command freezes all the databases specified in operand by SQL Server until backup processing is completed. Thus, if the volumes where database files exist are independent in each database, back up each database two or more times to shorten the time they remain frozen as much as possible.
The Advanced Copy which makes an SDX object (SynfinityDISK) backup volume is not supported now. Therefore, only the Advanced Copy from a database volume which is an SDX object to a backup volume which is a non-SDX object can be used.
Use the COPY command if you need to copy data to an SDX object.
Because the process of securing data consistency for database volumes when the backup is performed is done by SQL Server, the pre-processing and post-processing (i.e., volume lock and unlock) are not executed, as they would be with a typical file system volume.
If an error occurs while this command is processing a database consisting of two or more volumes with this command, processing is interrupted. When you perform synchronous type backup, restart the stopped synchronous processing by using swststartsync (Backup synchronous processing start command).
If an error occurs while swstbackup_sqlsvr (SQL Server backup execution command) is processing the database consisting of two or more volumes with swstbackup (Backup execution command), the backup history information on AdvancedCopy Manager may become inconsistent. In order to recover from such an inconsistent state, delete unnecessary history information using swsthistdel (a history information deletion command).
Normally, if the existing backup history reaches the maximum number of saved generations specified by swstbkpolset (Backup policy setting command), then information on the oldest generation is automatically deleted from the backup history information during the backup process, and the backup volume is cleared. However, if -suspend is specified for the backup history information, then the backup volume with the Suspend state is not cleared and the backup volume remains in use.
The transaction volume on which the backup command is executed, one other transaction volume, and the suspended backup volume cannot be specified as backup destinations in the device map file.
Before replication is performed in snapshot-type replication, this command option prevents other processes from accessing the replication destination volume in order to protect the process that is accessing the volume. The command accomplishes this by locking or dismounting the replication destination volume. In cases where the replication destination volume cannot be locked or dismounted, such as those described below, the command terminates with an error:
The mount point has a directory for mounting another volume.
The volume contains a file that is being used. If the replication destination volume is being used by a server that is not the server where the command was entered, prevent the replication destination volume from being accessed by cancelling share settings or performing dismounting for the replication operation, using the Administrator's authority.
This command cannot be executed if any of the following commands are running:
NAME
swstrestore_sqlsvr - restores of SQL Server database.
SYNOPSIS
<program-directory>\bin\swstrestore_sqlsvr [-Xserver Server-Name] [-Xinstance Instance-Name] [-Xnolog] -Xmeta Meta-File-Name DB-Name
DESCRIPTION
This command restores a SQL Server database. Enter this command after restoring database files using swstrestore (Restore execution command). This command recreates a database from restored database files. To perform recovery after this command has been executed, apply logs using Enterprise Manager/Management Studio or Transact-SQL.
OPTIONS
Specifies the virtual server name of a connected SQL Server in the case of cluster operation. In the case of operation without cluster, this option need not be specified.
Specifies a connection instance. Specify an instance name in the operand. If this option is not specified, connection will be made to the default instance.
Specifies restoring a DB to a backup point, without applying logs. If this option is not specified, the DB will be restored to a backup point but cannot be used until logs are applied to it. Apply logs using Enterprise Manager/Management Studio or Transact-SQL.
Specifies a metadata file name, using an absolute pathname. A metadata file will be stored as "db-name.swst-dmp" in the same folder as the primary data file. To confirm file identification numbers of database files, use the Transact-SQL "USE DB-Name EXEC SP_HELPFILE". After this command closes, the metadata file is deleted.
OPERANDS
Specifies a database name.
EXIT STATUS
=0: Completed successfully
>0: Terminated abnormally
EXAMPLES
Restore a database (DB01) using its backup data. The file restore using swstrestore has been completed and a metadata file exists at D:\SQLSVR\DB01.swst-dmp:
C:\>set SWSTGNODE=nodeAGT C:\>C:\Win32\AdvancedCopyManager\bin\swstrestore_sqlsvr -Xserver VSERVER -Xmeta D:\SQLSVR\DB01.swst-dmp DB01 DB01 swstrestore_sqlsvr completed C:\>
NOTES
You cannot specify a target backup volume and perform backup if:
Neither the virtual server nor the instance exists
By choosing whether or not to apply logs, you can select one of the following two restore methods:
Restore to a backup point (i.e., only restoring backup data)
Restore to the latest point or a specific point (i.e., restoring backup data and then applying logs)