Target database baselines can be seeded from an online replication enabled source database since Progress 9.1E and OpenEdge 10.1A when the -REPLTargetCreation flag (case-sensitive) was added to the product.
To assure a seeding a successful target baseline synchronisation:
0. Take the online source database backup to rebase the targets with the -REPLTargetCreation flag
1. Remove the <dbname>.repl.recovery files for both the source and target
2. Do not take any additional PROBKUP / PROQUIET against the the source database, until such time as:
3. Ensure there are sufficient AI extents on the source for the time it takes to rebase the target. When switched they will be marked LOCKED and unavailable for reuse until they have been processed against the target database once synchronised. If AIMGT is enabled, it is recommended to increase the archive interval online to assure unexpected delays do not cause production to stall or shutdown should it run out of available ai extents. Once the target is seeded, the interval can be re-set.
$ rfutil source -C aiarchiver setinterval 0
4. When restoring the target database with PROREST, consider restoring to a structure where there is more before-image space than the source database usually needs. This is to assure in the event of unexpected bi growth the source database can be truncated to recover without having to rebase the target (again) due to running out of bi space on the target-side.
5. The target database is started with the required "-DBService replagent" parameter, as well as the values of -L, -Mn and -n on the replication target to be greater than or (at least) equal to those of the source database, to assure AI transaction notes are forward processed successfully. Refer to Article: Does a replication target database require the same parameters as the source database?
Steps to re-seed a replication target baseline from an online source database
The following steps outline online target database re-recreation off a running replication source database.
[SOURCE server]
1. Stop the Replication Server (RPLS) if still running, the RELWAITS needs to be run after the RPLS is confirmed as stopped.
$ dsrutil source -C terminate server
$ dsrutil source -C RELWAITS (no longer used or necessary on 12.x+)
2. Create the backup for target creation:
IMPORTANT: No more PROBKUP, PROQUIET disable markbackedup or RFUTIL mark backedup commands to be run against the source database until this probkup volume has been restored to target, started and the RPLS and RPLA have synchronised or this will fail and the target baseline will have to be re-taken.
$ probkup online <source> <source>_b -REPLTargetCreation
$ rm <source>.repl.recovery (** important **)
[TARGET server]:
1. Stop the target database is still running and delete it:
$ proshut target -by
$ echo y | prodel target
2. Create the target baseline:
- Copy the <source>_b backup to the target machine.
- Ensure the <target>.repl.properties file is in the same directory as the <target>.db file will be restored to.
- Ensure that a <target>.st file exists in the same directory as the <target>.db file will be restored to with the same structure as the 'source.st' file.
- Ensure that there are no remaining: <target>.repl.recovery file (** important **)
$ rm <target>.repl.recovery
- Restore the target with one command line, disabling AIMGT if it was enabled on the source database and enabling as target database in one step with the -REPLTransition flag.
$ prorest target source_b -REPLTransition
Otherwise these will have to be executed in individual command lines: (proutil target -C enablesitereplication target; rfutil target -C aiarchiver disable). If the pre-existing target database was not deleted, target replication must first be disabled before restoring the source backup:
$ proutil target -C disableSiteReplication target
$ prorest target source_b -REPLTransition
3a. Start the target database:
$ proserve target [+ database startup parameters] -DBService replagent
3b. Restart the RPLS on the source machine to begin synchronization once the RPLS and RPLA connect.
$ dsrutil source -C restart server