Real-Time Backup Deployment Models

Real-Time Backup Deployment Models
A Look at Alternative Deployment Models for Real-Time Backup
DataExchange provides different deployment methods for Real-Time Backup replication. This chapter discusses the deployment methods available for the most common network configurations and provides you with information in addition to the deployment method between two machines discussed in Getting Started with Pervasive DataExchange Real-Time Backup Edition. This chapter also discusses disaster recovery procedures in the event you need to restore a replicated database. The sections in this chapter include the following:
*
*
*
*
*
Real-Time Backup Configurations
DataExchange offers three options for Real-Time Backup deployment. An interactive deployment method uses the Deployment Wizard, which automates the entire deployment process and enables creating a replication schedule. Another deployment method uses the DXDeploy utility, which automates several of the processes necessary for replication. Before you consider what deployment option to use, you should first consider how you will want to configure Real-Time Backup.
Two-Machine Configuration
The most common configuration for Real-Time Backup replicates data between two machines in real-time from a Pervasive PSQL database to a standby server. Upon a system failure, clients can be directed to the up-to-date standby server. Operating at the database level, DataExchange captures database changes on the primary server and applies them to the backup server.
This type of configuration allows DataExchange to avoid errors common to disk-based replication tools, like replicating corrupt data, spreading viruses, or deleting desired user data. With Pervasive DataExchange powering a standby server, data loss, and down time is greatly lessened in the event of system failures, hardware failures, or site disasters.
The following figure illustrates a one-way replication backup network using two machines.
Figure 4-1 Real-Time Backup with Two Machines
In this scenario, you have one server, Server A, networked with your backup server. The server runs its own database, dbA. DataExchange then maintains a copy of the database on the standby backup server and replicates with the server at the backup location when changes are applied.
See Replication Deployment using the Deployment Wizard for information on starting the DataExchange Deployment Wizard.
Refer to Chapter 4, Replication Deployment,in your Getting Started with Pervasive DataExchange Real-Time Backup Edition manual for instructions on implementing Real-Time Backup on a two machine configuration using DXDeploy.
Many-to-One Configuration
The other configuration commonly used with Real-Time Backup consists of several database servers at different locations that replicate data to a backup standby server hosting multiple backup databases. This is referred to as a many-to-one configuration. The following provides an illustration of this type of configuration.
Figure 4-2 Real-Time Backup with Many-to-One Configuration
In this scenario, you have three servers, Server A, Server B, and Server C. Each machine is networked with your backup server. Each server runs its own database, dbA, dbB, and dbC, respectively. DataExchange then maintains individual copies of each database to the standby backup server and replicates with the server at the backup location when changes are applied.
Refer to Many-to-One Deployment using DXDeploy, for instructions on implementing Real-Time Backup on a many-to-one configuration using DXDeploy.
Note Currently DataExchange only supports implementing Real-Time Backup on a many-to-one configuration using DXDeploy.
Replication Deployment using the Deployment Wizard
Real-Time Backup deployment can be implemented using the DataExchange Deployment Wizard. The Deployment Wizard is a step-by-step wizard for deploying replication at First and Partner Sites and includes a means of creating a replication schedule. The Deployment Wizard provides automation of the procedures for the DataExchange command-line utility dxdeploy.exe.
Access the Deployment Wizard from Pervasive Control Center by selecting DataExchange then Deployment Wizard or by selecting Deployment Wizard from the operating system Start menu or Start screen.
Before You Get Started
Before you start the DataExchange Deployment Wizard, we recommend that you review the following deployment attributes. It is a good idea to make note of these items for the database you are deploying, as they are needed to complete the Deployment Wizard.
*
Project Name – this corresponds to a specific database. If your goal is to replicate a database named mydatabase, then you may want to call the project mydatabase project or something similar.
*
*
*
*
For detailed information about these attributes, see XML Attributes in Deployment Descriptor File in Getting Started with Pervasive DataExchange.
Replication Deployment using DXDeploy
Simple replication deployment between two machines is the standard use case for Real-Time Backup. This scenario involves a primary server and a backup server, as shown in Figure 4-1.
For detailed instructions on deploying a Real-Time Backup solution using DXDeploy, refer to Chapter 4, Replication Deployment,in the Getting Started with Pervasive DataExchange Real-Time Backup Edition.
Many-to-One Deployment using DXDeploy
In a many-to-one configuration, multiple sites back up data to a single site. A good choice for a First Site in such a configuration is often the backup location. Consider the following example scenario:
Figure 4-3 Multiple Sites Backing Up Data
Three servers, A, B, and C, each has its own network. Each server runs its own database, dbA, dbB, and dbC, respectively. You want to implement a solution in which a replicated copy of each database is maintained on one backup machine.
Given this scenario, the most reasonable choice for the First Site is the backup location. Why? Part of the reason is that a replication network can have only one First Site. In addition, the backup location meets the following criteria:
*
*
*
The following image shows the same configuration after you install DataExchange. Note that the Partner Sites are the sources of the data and the First Site is the backup location.
Figure 4-4 Many-to-One Configuration with DataExchange Installed
Note In the reverse of a many-to-one configuration, one First Site source replicates to two or more Partner Site backups. This configuration is deployed as a two-way replication.
Before You Get Started
Before performing this task you must install Pervasive DataExchange on a First Site and a Partner Site as explained in Getting Started with Pervasive DataExchange.
Tip So that you can restore your databases to their original state after this exercise, we recommend saving a copy of the Demodata database files before proceeding with this example.
For discussion purposes, this task assumes the following:
*
You have read the chapter Replication Deployment in Getting Started with Pervasive DataExchange Real-Time Backup Edition.
*
*
Caution All applications using the database must be shut down before using this deployment method.
Deploying Using DXDeploy
*
 
1
For example, suppose that Demodata is the database used by Myapp.exe. Ensure that Myapp is not accessing Demodata while you perform the steps to deploy Demodata.
2
On the backup (first) site, open the XML descriptor file EXPRESS.XML in a text editor. The file is located in the \<Installation Directory >\Replication\Docs directory.
3
Note that you will edit, and use, a different descriptor file for each Partner Site. Because the backup (first) site is a shared location, some information in the descriptor file must be unique each time that you use the file. The following table explains this.
4
Save EXPRESS.XML as ServerA.xml to a location of your choice. This task assumes that you save it to C:\.
5
The backup location must be unique and must match the location specified for First Site DataDirectory in the XML descriptor file. This task assumes that the backup location is C:\Demodata_Backup_ServerA.
6
DXDeploy /Site=First C:\ServerA.xml
The command is case-insensitive.
7
Press Enter.
DXDeploy provides high-level status messages on the screen as it completes its actions. DXDeploy is complete when the command prompt reappears.
8
DXdeact <First Site DSN>
The command is case-insensitive.
<First Site DSN> is the DSN you specified in ServerA.xml for the First Site.
9
Press Enter.
10
Note For a many-to-one configuration, ignore the replication template created on the backup (First) site. Instead, use the files for the activated database, which are located in the DataExchange directory.
11
12
DXact /FIRSTSITE <First Site DSN>
The command is case-insensitive.
<First Site DSN> is the DSN you specified in ServerA.xml for the First Site.
13
Press Enter.
14
DXDeploy /Site=Partner C:\ServerA.xml
The command is case-insensitive.
15
Press Enter.
DXDeploy provides high-level status messages on the screen as it completes its actions. DXDeploy is complete when the command prompt reappears.
16
See Managing Replication Schedules for how to set up a replication schedule.
17
18
Repeat steps 1 through 17 for each of the other Partner Sites.
Substitute “ServerB” for “ServerA” when repeating the steps for ServerB. Substitute “ServerC” for “ServerA” when repeating the steps for ServerC.
Disaster Recovery
This section explains how to recover from the failure of one replication site. The information assumes that the disaster occurs to your primary site, requiring that you temporarily switch production to your backup site. After a primary site is again provided, you then need to reestablish the primary site/backup site replication network.
A disaster could, of course, occur to the backup site. The information still applies; just substitute backup for primary. For ease of discussion, and to remain consistent with terminology commonly used to discuss disaster recovery, this section refers to primary site and backup site. Think of them as the First Site and Partner Site, respectively.
The information in this section applies only to a real-time backup situation or to a 1-way situation. See the chapter Deployment Process in Getting Started with Pervasive DataExchange Real-Time Backup Edition for an explanation of real-time backup deployment. See DataExchange Implementation Options for an explanation of 1-way deployment.
Failover
In the event of a disaster, you must switch your users to access the backup site. Use whatever methods are in place at your company to accomplish switching to a different server. Such methods are many and varied and beyond the scope of this document.
Since the backup site contains current data, your application(s) should continue to function as before.
Once your users are accessing the backup site, reestablish your First Site. Two disaster scenarios exist pertaining to the data on the primary site:
*
*
No Data Recoverable
Use the following steps to reestablish your primary site.
*
1
Refer to the Getting Started guides for the product edition.
2
If the machine was a First Site before, install a First Site setup. If it was a Partner Site, install the Partner Site setup. Refer to the Getting Started guides for the product edition (Real-Time Backup or Data Synchronization).
3
This creates a fresh copy of your application database on the new machine.
4
5
You must ensure that the database is not being accessed until you get the primary and backup sites synchronized.
6
See dxdeact.
7
*
*
*
*
8
See dxact.
9
See dxact. Note that the activation on the backup site performs an initial replication with the primary site. An initial replication is a full replication, in which all data is synchronized between the two machines.
The primary site and backup site now contain the same data.
10
See Schedule Tasks.
11
 
Data Recoverable But Not Current
Use the following steps to reestablish your primary site.
*
1
2
You must ensure that the database is not being accessed until you get the primary and backup sites synchronized.
3
See Schedule Tasks.
4
Deactivate the replication database on both the primary and the backup sites.
See dxdeact.
5
See dxact.
6
See dxact. Note that the activation on the backup site performs an initial replication with the primary site. An initial replication is a full replication, in which all data is synchronized between the two machines.
The primary site and backup site now contain the same data.
7
See Schedule Tasks.
8