Swsrpbackup_sql and swsrprestore_sql are used in the backup operation of SQL Server by the replication management function.
NAME
swsrpbackup_sql - backup of SQL Server databases
SYNOPSIS
<program-directory>\bin\swsrpbackup_sql [-Xserver Server-Name] [-Xinstance Instance-Name] -Xdevmap Device-Map-File [-m] [-t] [-T] DB-Name-1 DB-Name-2,,,DB-Name-i
DESCRIPTION
This command backup of SQL Server databases. This command, in cooperation with SQL Server, performs copy of data of the target database volumes on to backup volumes by executing swsrpmake (Replication creation command). The database backup history information will be stored in msdb of SQL Server.
OPTIONS
Specifies the virtual server name of a connected SQL Server in the case of cluster operation. In case of operation without cluster, this option is not necessary.
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.
Specify a device map file name that describes combinations of database volumes and destination backup volumes. Specify a device map file name using an absolute pathname.
For backup server type operation (i.e., server-to-server replication), this option specifies that communication processing with the backup server (i.e., a non-operation server) is not performed. When it is specified, volume status check processing and pre-processing and post-processing are not performed for the backup volume. This option is valid only during backup server type operation.
Specifies that the pre-processing and post-processing for a backup volume (i.e., the copy destination volume) are not performed.
Use this option only when AdvancedCopy Manager does not execute pre-processing and post-processing of the copy destination volume and unique pre-processing and post-processing scripts are inserted before and after the AdvancedCopy Manager command (respectively).
Specifies that the differential snapshot high-speed backup will 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 the snapshot high-speed backup without specifying this option, ordinary snapshot processing (OPC without using the QuickOPC function) is started. This option must be always specified to perform a backup operation using differential snapshots.
OPERANDS
Specifies database names. Delimit by the half-size 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 (Suppose that the logical node name of AdvancedCopy Manager is nodeAGT.):
C:\>set SWSTGNODE=nodeAGT C:\>C:\Win32App\AdvancedCopyManager\bin\swsrpbackup_sql -Xserver VSERVER -Xdevmap G:\STGADM\devmap.txt DB01 DB02 DB03 DB01 DB02 DB03 swsrpbackup_sql 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 exists).
In the case of specifying two or more databases, all of the specified databases are not databases of the same instance (When the -Xinstance option is not used, the processing is performed on the default instance. When the -Xinstance option is used, the processing is performed on the specified named instance).
The specified device map file does not exist.
The description of the device map file on the target database volume has an error. (refer to "10.4.1.3 Prepare a device map file")
The database volumes and backup volumes described in the device map file are not registered as original volumes and replica volumes, respectively.
Synchronous processing between the database volumes and the backup volumes described in the device map file is not in equivalency maintenance state.
After operation has begun, any of physical information (i.e., box identifier, OLU number, EXTENT start position, or EXTENT size) of a volume has been changed.
A database volume has multiple mount points.
If a database volume is an SDX object (when using 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.
When all the backup volumes are volumes on the database server, the -m option is specified.
For backup server type operation (server-to-server replication), the Managed Server on which the command is executed is not the operation server of the corresponding replication volumes.
For backup server type operation (i.e., server-to-server replication), communication with a destination server fails.
Too many (i.e., 65 or more) databases were specified.
When the replication destination volume cannot be locked
When the contents of the replication destination volume lock operation specification file are invalid
Perform drive letter release or dismount of copy destination volume before executing a command when the intended backup corresponds to either of the following conditions:
When a replication is performed between different OSs
When the sizes of the replication source volume and the replication destination volume differ
If neither drive letter release nor dismount are performed in the above-mentioned case, post-processing of the copy target volume at the time of backup produces as an error.
If this command is executed during the running of snapshot processing, stop the copy processing that is in progress and start the snapshot processing again.
This command can back up two or more databases at the same time by specifying the operand. When, for example, two or more databases exist on one partition, physical files of multiple databases exist together on different volumes, perform the backup of all the databases which exist on the volumes by using this function.
This command freezes all the databases specified by SQL Server until backup processing is completed. Thus, if the volumes where database files exist are independent for each database, back up each database two or more times to reduce the frozen time 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 when 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 in a typical file system.
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 any stopped synchronous processing by using swsrpstartsync (Synchronous processing start command).
Before replication is performed in snapshot-type replication, this command option prevents other processes from accessing the replication destination volume to protect the process that is accessing the volume. The command accomplishes this by either 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 has 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 a dismount for the replication operation, using the Administrator's authority.
This command can be executed only while none of the following commands are running:
NAME
swsrprestore_sql - restores an SQL Server database
SYNOPSIS
<program-directory>\bin\swsrprestore_sql [-Xserver Server-Name] [-Xinstance Instance-Name] [-Xnolog] -Xmeta Meta-File-Name DB-Name
DESCRIPTION
This command restores an SQL Server database. Enter this command after restoring database files using swsrpmake (Replication creation command). This command recreates a database from restored database files. To perform recovery after this command is executed, apply logs using Enterprise Manager/Management Studio or Transact-SQL.
OPTIONS
Specifies the virtual server name of a connected SQL Server in case of cluster operation. In 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 the restoration of 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.swsrp-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.swsrp-dmp:
C:\>C:\Win32App\AdvancedCopyManager\bin\swsrprestore_sql -Xserver VSERVER -Xmeta D:\SQLSVR\DB01.swsrp-dmp DB01 DB01 swsrprestore_sql completed C:\>
NOTES
You cannot specify a target backup volume and perform backup if:
Neither the virtual server nor the instance exist
By choosing to apply logs or not, you can select one of the following two restoration methods:
Restore to a backup point (ie, only restoring backup data)
Restore to the latest point or to a specific point (ie, restoring backup data and then applying logs)