Salesforce

How many online probkups can be taken?

« Go Back

Information

 
TitleHow many online probkups can be taken?
URL NameHow-many-online-probkups-000068748
Article Number000185170
EnvironmentProduct: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All supported platforms
Other: PROBKUP
Question/Problem Description
How many online backups can be taken?
Is there a limit to the number of times a database can be backed up online
Will PROBKUP online always be reliable?
When will backup volumes no longer be usable and why?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement NumberPSC00343851 / OCTA-10404
Cause
Resolution

PROBKUP has a limit of 16 million online backups:

Since OpenEdge 11.7.5, 12.0 and later, Enhancement PSC00343851 / OCTA-10404 increased the backup counter from 65,535 to 16,777,215

In OpenEdge 12, the backup counter stored in the database Master Block has been extended for Type II Storage Areas to provide a maximum of 16 million backups.
  • The logic in backup has been changed for Type I Storage Areas to work with this limitation.
  • The first full backup in OpenEdge 12 will set the backup counters appropriately.
  • The command to enable this feature is no longer functional in OpenEdge 12, as this feature is enabled by default and is no longer listed in the DB Features report.
In OpenEdge 11.7.5, this change is only available once the new database feature to support 16 million backups is enabled (offline), which initiates bi recovery:
$   proutil <dbname> -C EnableBackupCounterExtension  
  • The Backup Counter Extension feature must first be manually enabled offline before the backup counter overflow
  • Once the extended backup counter feature is enabled, the next backup is required to be a full backup in order that the new update counters are initialised in every database block to support this feature. 
The Backup Counter Extension feature can be disabled offline, again followed by a full probkup to revert the update the backup counters:
$  proutil <dbname> -C DisableBackupCounterExtension 
                  
The Database Features Report will verify if a database has the new backup counters enabled (Feature 28):
  • This feature will only be seen in OpenEdge 11.7.5+ Database Features Reports
  • If an OpenEdge 11.7.5+ database has this feature enabled, migrating to OpenEdge 12 with conv1112 removes the feature bit, because the underlying code and functionality are always on and no is longer displayed in the Database Features Report
$   proutil <dbname> -C describe  
Database Features
   ID   Feature                            Active  Details
  ----  ---------------------------------  ------  -------
...
    28  Backup Counter Extension           Yes
 

PROBKUP has a limit of 65535 online backups:

Prior to OpenEdge 11.7.5, 12.0, the backup counter stored in the database Master Block is 2 bytes which has a maximum value of 65535 . 

  • This backup counter is incremented in the Database Master Block every time a PROBKUP is run (online, offline; full, incremental).
  • The inevitable end result of databases that are backed up frequently over a number of years, is that this counter will overflow once reached. As a consequence, all necessary blocks in the database will not be included in the online backup volume(s).
  • For example, if one PROBKUP is taken every hour (online/offline/incremental), the counter will overflow in ~7 years. 

What happens when the backup counter overflows?

  1. The logic which determines if a block should be backed up in an online backup routine, will not consider existing data blocks to be included as their backup counters are higher than the overflow value stored in the master block backup counter. The online backup will initially only backup 'new' database blocks that have never been backed up (ie empty blocks that have been formatted) and from that point on, these database blocks if they qualify and 'new' database blocks resulting in an invalid backup volume.
  2. The offline backup logic is different and is therefore not affected by the backup counter overflow. In other words, an offline PROBKUP will be complete and a full restored database will result, but subsequent online PROBKUP of this restore will suffer the same online backup counter overflow logic.

How to reset database block backup counters?

Once the backup counter has overflowed, neither PROCOPY nor offline backup PROREST will reset block backup counters. The following methods each have their pro's and con's, which will need to be mooted per user case:
  1. Upgrade to OpenEdge 11.7.5+ and enable the Backup Counter Extension feature
  2. Migrate to OpenEdge 12+ with conv1112 and run a full backup. The first backup after enabling the feature or conv1112 is enforced to be a full probkup.
Alternatively, to re-set backup counters:

Option 1: Dump and load the database to re-initialise the backup counter on all database blocks.
  • Backup counters in the database blocks are reset to 0 after a dump and load.
Option 2:  Move all database objects to new Storage Areas and eventually remove the existing Areas from the database structure with PROSTRCT REMOVE.
  1. move tables and indexes with PROUTIL -C tablemove/indexmove
  2.  move LOBS with buffer-copy ABL code
  3. This includes using 'PROUTIL -C mvsch', to re-initialise the Schema Area and eventually remove the "Old Default Area".

Until database block backup counters can be reset:

An alternative backup strategy needs to be engineered, Options include:

  • Offline PROBKUP
  • Online OS copy (with PROQUIET on Enterprise databases)
  • AI Rollforward from the last restored probkup volume before counters overflowed or using the offline backup to apply ai notes.
  • OpenEdge Replication Target database online PROBKUP (available since OpenEdge 10.1C), if the backup counter on the target has not overflowed.

How to determine the current backup counter value ?

Verify the current backup counter to assure the reliability of a site's backup strategy and plan for corrective actions.  It is important to note:
  1. If the backup counter has overflowed, the database must be re-set as outlined above. It is not sufficient to simply enable the Backup Counter Extension feature
  2. In OpenEdge 11.7.5, the Backup Counter Extension feature must be manually enabled offline before the counter overflow, followed by a full PROBKUP

OpenEdge 10,11: To verify the current backup counter value

1.  Examine the value of "bk_incr" in the Master Block approaching 2^16 - 1 = 65535
$  proutil dbname -C truncate bi
$  proutil dbname -C dbrpr
Select the following DBRPR Menu options, or provide these in an input text file as outlined below.
 
13. Display Block Contents
3. Select Block Type
C. Clear all types
1. Master Block
R. Return to Display Menu
G. Go 
Schema Area (6)  
Extent 1  
Block 2 ----------- 0000 
bk_dbkey:     0x00000020         32      
bk_type:      0x01               1 (Master Block)      
bk_frchn:     0x7f               127 (NOCHN) **   
bk_incr:      0xFC92             64658

         

Progress 9 : To verify the current backup counter value

The DBRPR Menu Options above are not available in Progress 9. The Master Block needs to be dumped with DBRPR and analysed:

  • The backup counter value is on the first line offset: 06-07

1. The database Master Block for a multi-volume database is the second physical block of the first data extent (Schema Area).

  • Identify if the Schema Area has 32 or 64 records per blocks (RPB) from the database structure with "prostrct list <dbname>

2. Use DBRPR to dump the Master Block from the Schema Area (6).

By default the DBRPR tool starts in the Schema Area: Current Working Area: Schema Area

The Master Block is the first Block in this Area:

  • If the Schema Area is 32 RPB then the dbkey for the master block is 32
  • If the Schema Area is 64 RPB then dbkey for the master block is 64.
Select the following DBRPR Menu options, or provide these in an input text file as outlined below.
4. Dump Block
Enter dbkey: <32 or 64>

$  proutil dbname -C truncate bi
$  proutil <dbname> -C dbrpr <dump.in> /dev/null 2>&1

Where dump.in contains the DBRPR Options to dump the Master Block:
4
<Substitute with 32 or 64 depending on the RPB value>
q
 
Examine the resulting 32.dmp or 64.dmp file:

The bk_incr value is at HEX offset 06-07

Example: Current backup counter value: 0xFDFE == 65,022  (513 backups remaining)
>0000    4000 0000 017F FDFE 0000 0000 0000 00E6
------------------------^^^^
On Windows, the current backup counter value is byte swapped: 0xFEFD >> 0xFDFE == 65022 (513 backups remaining)
 
>0000    4000 0000 017F FEFD 0000 0000 00E6 0000
------------------------^^^^

   

Other indicators that the backup counter has overflown: 

Just because the bk_incr value is not approaching the 65535 limit, it may have already overflown.  Further samples of data blocks will need to be examined through the above DBRPR menu to find if there are any blocks with higher backup counter values, which can be an onerous undertaking.  Other 'tells' that the backup counter has overflown:
 
a.  The online backup is a lot quicker than usual, as there are less blocks that qualified to be backed up
b.  The online backup volume is smaller than it should have been, provided the same volume is not overwritten by subsequent backups.
c.  The backup volume will also restore faster than usual.
d.  Parsing historic database lg files, the number of "backup blocks" drops dramatically then starts increasing again:
(13625) Wrote a total of 11955 backup blocks using 1.6 GBytes of media
(13625) Wrote a total of 16 backup blocks using 2.1 MBytes of media.
(13625) Wrote a total of 806 backup blocks using 107.1 MBytes of media.
e.  Approximating the HWM by using a PROSTRCT STATISTICS report to compare with the backup blocks written  from full online backups, will show that the online backup volume does not include all blocks to the HWM of each Area. 
Example: (13625) Wrote a total of 11955 backup blocks using 1.6 GBytes of media
This database backup volume should be around 1.6 GB, using 11955 backup blocks with a default -bf 34 and database blocksize of 4KB
The cumulative HWM for the database from the statistics report will be 419430
f. The PROREST (restore) of this online backup will succeed, but the restored database is unlikely to be accessible when blocks that were not backed up are involved with BI redo or undo processing. If the database is accessible, it will crash with block corruption (1124) errors, where the blocks found are empty. 
(9445)  SYSTEM ERROR: read wrong dbkey at offset
(1124)  SYSTEM ERROR: Wrong dbkey in block. Found 0, should be <dbkey> in area <area number>. 
Workaround
Notes
Keyword Phrase
Last Modified Date6/4/2024 1:24 PM

Powered by