CML - Database restore

This chapter describes how to restore databases on CML server.

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/warning.svg This article is not intended as the standalone recovery procedure. Kindly use this article only in case that you are pointed to it from another article (such as CML - Recovery procedure for master node). The articles pointing to this one are explicitly saying which databases shall be restored and where they shall be taken from.

Document is divided into several parts depending on the used database engine:

Database restore on PGSQL database

Chapter describes the way how to restore PG-SQL databases.

Please check that current backup files are available before you start with restore procedures.

1

Open the Services window (e.g. Start => Run => services.msc) and stop all YSoft SafeQ services:

  • YSoft SafeQ CML

  • YSoft SafeQ CML DBS

  • YSoft SafeQ Terminal Server

  • YSoft SafeQ LDAP Replicator Service

  • YSoft SafeQ Web Interface

images/download/attachments/21955756/01.PNG

2

Using the program pgAdmin III connect to the SQDB5 database:

  • Launch the program by selecting Start menu -> All Programs -> PostgreSQL 9.2 (Start menu -> Y Soft Corporation in the case of embedded PG-SQL installation )  or <SAFEQ_DIR>/PGSQL/bin/pgAdmin3.exe.

  • Double-click SafeQ PostgreSQL (in the tree under Servers). The program asks for authentication.

  • Enter the password you have selected in CML installation (for postgres users).

images/download/attachments/21955757/04.PNG

3

Delete current databases (SQDB5 and SQDB5_SQDW) in case they exist

images/download/attachments/21955756/011.PNG

4

Create a new Databases

  • Right-click Databases => New Database...

  • Create new databases with the same names as original ones

    • SQDB5

    • SQDB5_SQDWimages/download/attachments/21955756/012.png

5

Restore database from existing backup file SQDB5.

  • Right-click the database name (SQDB5), select "Restore..." option.

  • Select your backup file

  • Click "OK"

  • Backup will be restored

Restoration must end with Error code 0

images/download/attachments/21955756/013.png

6

Restore database from existing backup file SQDB5_SQDW.

  • Right-click the database name (SQDB5_SQDW), select "Restore..." option.

  • Select your backup file

  • Click "OK"

  • Backup will be restored

Restoration must end with Error code 0

7

Check step:

Once databases are restored, check that they contain all tables

Go to the Databases => SQDB5 => Schemas => Public => Tables and check that tables are created

  • SQDB5 has about 142 tables

  • SQDB5_SQDW has about 37 tablets

 

8

Open the Services window (e.g. Start => Run => services.msc) and start all YSoft SafeQ services:

  • YSoft SafeQ CML

  • YSoft SafeQ CML DBS

  • YSoft SafeQ Terminal Server

  • YSoft SafeQ LDAP ReplicatorService

  • YSoft SafeQ Web Interface

images/download/attachments/21955756/010.PNG

 

 

Database restore on MS-SQL database

Chapter describes the way how to restore MS-SQL databases.

Please check that current backup files are available before you start with restore procedures.

1

Open the Services window (e.g. Start => Run => services.msc) and stop all YSoft SafeQ services:

  • YSoft SafeQ CML

  • YSoft SafeQ CML DBS

  • YSoft SafeQ Terminal Server

  • YSoft SafeQ LDAP Replicator Service

  • YSoft SafeQ Web Interface

images/download/attachments/21955756/010.PNG

 

2

Using the SQL server management studio connect to the SQDB5 database:

  • Launch the program by selecting Start menu -> All Programs -> Microsoft SQL server -> SQL Server Management Studio.

  • Enter the password you have selected in CML installation (usually for sa user).images/download/attachments/21955756/014.PNG

3

Delete current databases (SQDB5 and SQDB5_SQDW) in case they exist

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg Select Close existing connections when deleting databases

images/download/attachments/21955756/015.png

4

Restore databases:

  • Right-click Databases => Restore Database...

  • Restore databases with same names as deleted

    • SQDB5

    • SQDB5_SQDW

      images/download/attachments/21955756/restore.jpg

 

5

Check step:

Once databases are restored, check that they contain all tables.

Go to the Databases => SQDB5 => Schemas => Public => Tables and check that tables are created

  • SQDB5 has about 142 tables

  • SQDB5_SQDW has about 37 tablets

6

Open the Services window (e.g. Start => Run => services.msc) and start all YSoft SafeQ services:

  • YSoft SafeQ CML

  • YSoft SafeQ CML DBS

  • YSoft SafeQ Terminal Server

  • YSoft SafeQ LDAP Replicator Service

  • YSoft SafeQ Web Interface

images/download/attachments/21955756/010.PNG