Consultor Eletrônico



Kbase P143492: How to use os-copy for recreating the target database?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/17/2010
Status: Verified

GOAL:

How to use os-copy for recreating the target database?

GOAL:

Can I use proquiet and a third party online backup to create a Fathom target database?

GOAL:

Is it possible to perform an third party online backup of the Replication source database in order to create a target database?

FACT(s) (Environment):

All Supported Operating Systems
Fathom High Availability Replication 10.0B
OpenEdge Replication
OpenEdge Replication 10.2x
OpenEdge Replication 10.1x

FIX:

After starting the Source database with the defer-agent-startup parameter, it is possible to perform a third party online backup of the replication enabled source database by issuing a proquiet command with the -ReplTargetCreation parameter. Quiet point is a feature of ENTERPRISE database license and NOT available in WORKGROUP.

METHOD#1 STEPS: Using a Database Quiet Point for OS Copy

NOTE: The following example is for a WINDOWS environment. It includes the possibility of the source database enabled for ai archiving, and for considerations when taking an_other OS copy like removing the repl.recovery files for example. As with any DR plan, it is advisable to test the method before needing to run the proceedure against the live/production environment.

[SOURCE]

1. Shutdown the source database
proshut source -by

2a If the database is already enabled for replication (source) the following steps:
del source.repl.recovery
del /S /Q D:\101C\WRK\aiarc\ais1\*
del /Q D:\101C\WRK\repl\source\source.archival.log
prostrct list source source.st # this is to ensure the most recent structure is recorded so the target has at least the same structure as source.

2b If this is the first time the database is enabled for replication the following steps:
rfutil source -C mark backedup
prostrct add source source_ai.st
rfutil source -C aimage begin -G 0
proutil source -C enablesitereplication source
rfutil source -C aiarchiver enable

3 Start the source database
proserve source -S 4500 -B 10000 -L 20000 -spin 8000 -pica 512 -bibufs 30 -aibufs 45 -aistall -aiarcdir "D:\101C\WRK\aiarc\ais1,D:\101C\WRK\aiarc\ais2" -aiarcinterval 300 -bithold 75000 -bistall -DBService replserv

# At this point the source database is enabled for replication and the database has been started with the "defer-agent-startup" parameter set in the source.repl.properties file

4 Now take the OS copy
Enable a quiet point against the source database with the -ReplTargetCreation flag:
$ proquiet source enable -ReplTargetCreation
** check that the quiet point has been raised **
** take your OS backup **
** check the OS backup has completed **
Disable the quiet point against the source database:
$ proquiet source disable

# At this point transaction activity on the source database continues, the transaction notes are recorded in the source datbase After-Image files (ai files)


[TARGET]

# if a prior target replication baseline exists, remove it with the following steps:
echo y | prodel target
del *.repl.recovery

# to create the new target replication baseline:
transfer the OS copy to the target environment
CHECK: the OS copy has transfered 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 "target.st" file has full paths to extents on the target machine, based on the source.st file above

# NOTE, with os-copy the 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 -pica 4096 -DBService replagent


METHOD#2 STEPS: Disable replication for OS Copy

[SOURCE]
1. Shutdown the source database
proshut source -by

2. Disable sitereplication
proutil source -C disablesitereplication source

3 Disable after-imaging
rfutil source -C aimage end

4. delete *.repl.recovery files

5. Flag the source database as backed up
probkup source /dev
ull (no extra space needed (see step 9), no prorest and provides a source database block integrity check)

6. OS Copy source database to fathom target machine

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.
probkup incremental "source" "incremental file"

10 transfer "incremental file" to fathom target machine

[TARGET]

1 delete *.repl.recovery files

2. Repair the OS copy of source
prostrct repair source source.st # make very sure that the source.st file is correct for the target machine with full paths.
Note: the builddb method could also be used

3. Restore the incremental probkup
prorest "source" "incremental file"

4. enable sitereplication (fathom target)
proutil source -C enablesitereplication target

5. Start fathom source and target databases
.