Feedback
Did this article resolve your question/issue?

   

Article

How to use OS-copy for recreating a Replication Target database?

« Go Back

Information

 
TitleHow to use OS-copy for recreating a Replication Target database?
URL NameP143492
Article Number000135082
EnvironmentProduct: Fathom High Availability Replication
Version: 10.0B
Product: OpenEdge Replication
Version: 10.1x, 10.2x, 11.x
OS: All supported platforms
Question/Problem Description
How to use OS-copy for recreating a replication target database?
Is it possible to perform a non-Progress backup of the Replication source database in order to create the target database?
Can I use PROQUIET and a third-party online backup methodologies to create a Replication enabled target database?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
After starting the Source database with the defer-agent-startup parameter configured, it is possible to perform a third party online backup of the replication enabled source database after raising a PROQUIET with the -REPLTargetCreation parameter. Quiet point is a feature of ENTERPRISE database license and not available in WORKGROUP.

In this Article, the terms "OS copy" or "OS backup" refer to any non-Progress third party backup of the source database files.
 
METHOD 1: Using an online Database Quiet Point for OS Copy target creation
 
As with any DR plan, it is advisable to test the method before needing to run the procedure against the live/production environment.
The following example includes the possibility of the source database enabled for AI Archiving and considerations needed when taking an OS copy like:
  • Removing the respective repl.recovery files, and
  • Repairing the Control Area. An OS copy of the source replication enabled database cannot be repaired with the PROSTRCT builddb method as this breaks the replication flag in the master block.
 
[SOURCE]
 
1. If this is the first time the database is enabled for source replication the following steps, otherwise skip to Step 2 below:
 
While Replication and After-Imaging can be enabled online since OpenEdge 10.1C with online PROBKUP, since the subject of this Article is specifically OS backup methods, it is being excluded from consideration.
 
a. Shutdown the source database
$   proshut source -by
 
b. Enable Source Replication:
$   rfutil source -C mark backedup
$   prostrct add source source_ai.st
$   rfutil source -C aimage begin
$   proutil source -C enablesitereplication source
$   rfutil source -C aiarchiver enable

Ensure the most recent database structure is recorded which is important for the target baseline later:
$   prostrct list source source.st  
 
c. Ensure the source.repl.properties file is in the same directory as the source.db file and contains the "defer-agent-startup" parameter.
 
d. Start the Source database:
$   proserve source {+site database startup params} -S 4500 -pica 1024 -aistall -aiarcdir "<fullpath>\aiarc\ais1" -aiarcinterval 600 -DBService replserv 
 
At this point the database is enabled for source replication and has been started with the "defer-agent-startup" parameter as configured in the source.repl.properties file.
 
2. If the online database is already enabled for source replication, terminate the Replication Server:
 
$   dsrutil source -C terminate server

Ensure the RPLS has stopped before issuing RELWAITS:
$   dsrutil source -C RELWAITS 
$   del source.repl.recovery


Ensure the most recent database structure is recorded which is important for the target baseline later:
$   prostrct list source source.st  
 
3 Take the OS copy of Source:

a.  Enable a quiet point against the source database with the -ReplTargetCreation flag:
$   proquiet source enable -REPLTargetCreation

b.  Verify that the quiet point has been raised before taking the source OS backup.

c.  Verify the OS backup has completed.
 
d. Disable the quiet point against the source database:
$   proquiet source disable
 
At this point transaction activity on the source database continues, transaction notes are recorded in the source database After-Image files (ai files) and these are set to status LOCKED when switched until the target baseline is ready.
 
 
[TARGET]
 
1. If a prior target replication baseline exists, remove it:
$   echo y | prodel target
$   del *.repl.recovery
 
2. Create the new target replication baseline:
 
a. Transfer the OS copy from the primary source to the secondary target environment.
  • CHECK: The OS copy has transferred without issues eg: create a checksum or similar on the transfer
  • CHECK: UNIX environments, matching UID and GID accounts on the target machine to match the UID and GID from the source machine.
  • CHECK: <target>.repl.properties are in place
  • CHECK: The "source.st" file on the target machine has full paths to the OS copied source database extents on the target machine, based on the source.st file above
  • CHECK: The source.a* AI files are included in the OS copy
 
b. Repair the target Control Area structure, enable target replication and start the target database:
 
With OS-copy the "target" database will have the same name as the source database.
 
$   prostrct repair source source.st
$   proutil source -C enablesitereplication target
$   rfutil source -C aiarchiver disable
$   rfutil source -C aimage end
$   proserve source -S 4501 -B 10000 -L 20000 -spin 1 -bibufs 50 -DBService replagent
 
c. On the Primary Source machine, restart the Replication Server (if needed)
$   dsrutil source –C restart server
 
 
METHOD 2 : Disable replication for offline OS Copy target creation

This method is useful when migrating the replication database to another OpenEdge version or bit-version where AI transaction compatibility is not supported necessitating AI to be disabled.
 
[SOURCE]
 
1. Shutdown the source database:
$   proshut source -by
 
2. Disable sitereplication:
$   echo y | proutil source -C disablesitereplication source
 
3. Disable after-imaging:
$   rfutil source -C aimage end
 
4. Delete *.repl.recovery files from both the source and target environments
 
5. Flag the source database as backed up by specifying the nul bit bucket as the backup volume. This way no backup volume space is needed yet provides a source database block integrity check prior to OS-copy target creation and allows the incremental backup to be restored (Step 9).
 
[UNIX] probkup source /dev/null   
[WINDOWS] probkup source NUL
 
6. OS Copy the offline source database to the secondary target machine, ensuring the checks in Method 1 Step 2a above.
 
7. Enable after-imaging on source
$   rfutil source -C aimage begin
 
8. Enable source sitereplication
$   proutil source -C enablesitereplication source
 
9. Take an incremental backup of source.  This will involve minimal time, space and later PROREST against the OS Copy.
$   probkup incremental "source" "incremental_volume"
 
10 Transfer "incremental_volume" to the secondary target machine.
 
[TARGET]
 
1. If a prior target replication baseline exists, remove it:
$   echo y | prodel target
$   del *.repl.recovery
 
2. Repair the OS copy of source:

 Ensure that the source.st file is correct for the target machine with full paths
$   prostrct repair source source.st
 
3. Restore the incremental probkup:
$   prorest "source" "incremental file"
 
4. Enable sitereplication (target):
$   proutil source -C enablesitereplication target
 
5. Start the source and target databases.
 
Workaround
Notes
Last Modified Date3/31/2021 7:33 AM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.