Restoring the Copy Services Manager database
You can restore a Copy Services Manager database that was previously backed up to the local system.
About this task
Restoring the database does not require administrator privileges. However, you must be able to access the files on the Copy Services Manager server that are listed in the procedure.
Complete these steps to restore the Copy Services Manager database from a backup database:
Procedure
- Stop Copy Services Manager on the active management server as described in Stopping the Copy Services Manager server.
-
Copy
the following directories, and all of their contents to another location, such as
<path prefix>/..../csmdb_bak:
- For distributed systems, copy the install dir\liberty\wlp\usr\servers\csmServer\database\csmdb directory.
- For z/OS, copy the path_prefix/opt/IBM/CSM/wlp/usr/servers/csmServer/database/csmdb directory.
- Delete the following directories and all of their
contents:
- For distributed systems, delete the install dir\liberty\wlp\usr\servers\csmServer\database\csmdb directory.
- For z/OS, delete the path_prefixopt/IBM/CSM/database/csmdb directory.
-
Extract the backup database in the following locations:
- For distributed systems, in the install dir\liberty\wlp\usr\servers\csmServer\database\csmdb directory.
- For z/OS, in the path_prefix/opt/IBM/CSM/wlp/usr/servers/csmServer/database/csmdb directory.
- For distributed systems, in the install dir\liberty\wlp\usr\servers\csmServer\database\backup\ directory.
- For z/OS, in the path_prefix/opt/IBM/CSM/wlp/usr/servers/csmServer/database/backup/ directory.
Tip: You can use the Java Archive (JAR) Packing Tool to extract the archived Copy Services Manager database backup on Linux and IBM Z® by using the jar -xvf command.From the ../database folder, run the following command in the JAR Packing Tool to extract the Copy Services Manager database (csmdb):<path to java runtime>/jar -xvf <path to backup>/csmBackup_<DATESTAMP>.zip
Note: You can also restore from the automatic backup file, which has the following naming convention: csmAutoBackup_YYYYMMDD_HHMMSSmmm.zipOnly the <path to java runtime> is different between Linux and IBM Z.
For more information on how to use the JAR Packing Tool and jar command, including examples, see https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jar.html.On Windows operating systems, if the WinZip utility does not open by default, you can download it from http://www.winzip.com/win/en/index.htm. To extract all the contents of a compressed (.zip) folder on Windows, press and hold (or right-click) the folder, select Extract All..., and then follow the instructions.
-
For UNIX and IBM Z only: Issue the
following commands to change the permissions of the csmdb directory:
- chgrp -R csm_user csmdb
- chmod -R u+rwx csmdb
- chmod -R g+rwx csmdb
- chmod -R o+r csmdb
- Restart Copy Services Manager on the active management server as described in Starting the Copy Services Manager server.
- Verify that the sessions reflect the correct state and status, and contain all copy sets that were last known. Resolve any changes that occurred since the backup was created. If you exported copy sets, you can resolve changes by using the exported .csv files. For more information, see Exporting copy set data and Importing copy set data.
- Optional:
Start the Copy Services Manager sessions by using
the appropriate start commands. The start commands reestablish the relationship between the volume
pairs and synchronize data on those volumes.
Note: This step is not necessary if the database has the most recent data. Perform this step only if both the session state is not the same as the last known state and the changes that were made after the last backup require a start command to get the session in sync with the hardware. Ensure that the session state is unchanged. There might be a change if, for example, a disaster recovery event occurred while you were performing these steps by using the DS command-line interface (DSCLI). Otherwise, issuing a start command might overwrite the last valid consistency group.
- Optional:
If you have a standby management server, reestablish that standby relationship to update the
database on the standby server.
Note: This step is only needed if the standby server has also become corrupted and unusable. Otherwise, use the high availability (HA) function to restore the settings on the active server.