There are essentially two different methodologies that need to be used in an OS copy/mirror methodology involving replication, depending on the Progress version.
Of paramount importance to this subject (irrespective of Progress version) is that the "
problem" with using an OS copy/snapshot and after-imaging, is that one has to manually ensure that on the database side, a valid OS backup copy is one that has an increment of the backup version in masterblock (RFUTIL -C MARK BACKEDUP) + a "CLEAN" ai file. In other words, the ai file must not span the OS copy. Moreover, absolutely nothing must touch the database while the OS copy is taking place - this would invalidate the baseline (period).
These methodologies are outlined in the following Progress Articles:
How to use an OS backup with after imaging enabled - post Progress 9.1E? How to use OS backup with after imaging enabled - pre Progress 9.1E? When to use rfutil -C sequence with an OS or proquiet database copy? Upgrading to Progress 9.1E (or OpenEdge 10.0B01 or 10.1A and above) is a good idea apart from the many other functional feature benefits, the introduction "
RFUTIL -C SEQUENCE" utility that particularly relates to this case. It is not the objective of this Article to discuss the methodology, but to provide some D/R planning considerations by clarifying the methodology behind the internals checks that allow successful roll forward operation against an OS copy of an AI enabled database.
Before the introduction of this "RFUTIL -C SEQUENCE" utility, an OS_Backup_ai plan meant that if one wanted to use an_other/a_later OS backup to roll forward against, one would have to first re-set the backup + ai file baseline offline (rfutil -C aimage end; OS backup; rfutil -C mark backedup, rfutil -C aimage begin) .. then any OS backups that are taken "in between" baselines, are just OS backup baselines that cannot be used for roll forward.
WHY?
There are two counters in a database master block that have relevance in this situation:
- One counter is the expected AI sequence,
- The other counter is the current AI sequence.
These counters are incremented under the following conditions:
- Every time an AI file is switched (automatic ai switch when filled, aiarchiver daemon, trigger a switch with "rfutil -C new" or disable a quiet point without the nolock option): the current AI sequence number is incremented.
- When probkup is issued against a database, it adjusts the expected AI sequence number.
- After an after image file applied to a database (roll forward), it adjusts the expected AI sequence number.
- The "rfutil sequence" option, adjusts the expected AI sequence number.
When an OS copy of the production database is taken:
- The database master block in the OS copy is an exact copy of that in the production database.
- No AI files will have ever been rolled forward against this database since after-imaging was initially set (RFUTIL -C AIMAGE BEGIN),
- The expected AI sequence number will not have been incremented under these conditions.
- When AI files are rolled forward against this copy (hot-standby), the first rfutil -C roll-forward disables after-imaging.
The expected AI sequence in production is therefore typically 1 and never grows, unless probkup is occasionally used. More specifically, the expected AI sequence number is not in line with the current ai sequence number. OS backups are outside the Progress database manager control, there's no point in incrementing the "expected counter", an equally disparate message would still result. Furthermore, with OS backups, it's up to the administrator to ensure that the "RFUTIL -C AIMAGE NEW" is issued precisely.
Every time an OS backup is taken, a progressively higher current AI sequence number is used which are recorded by the Progress rfutil utilities, but the expected AI sequence number is usually 1 but will never-the-less always be a much smaller sequence value than the current ai sequence.
The "sequence" option of rfutil was therefore introduced to adjust the expected to match the current ai sequence. The utility reads the current AI sequence and uses the number it gets from that to overwrite the expected AI sequence in the master block of the database AI files are about to roll forward against.