Kbase P145009: How to find the database Storage Areas and extent sizes needed for a PROREST?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/04/2011 |
|
Status: Verified
GOAL:
How to find the database Storage Areas and extent sizes needed for a PROREST?
GOAL:
How to make a new .st file based on prorest -list information from the probackup file ?
GOAL:
How to ensure that the structure file for prorest is large enough to accommodate the restore content?
GOAL:
How to calculate the .st file sizes from a probkup ?
GOAL:
How to build the structure file for a database backup to be restored to ?
GOAL:
How to find the database extents needed from a probkup?
GOAL:
How to find the database blocksize needed for a prorest from a probkup?
FACT(s) (Environment):
OpenEdge Category: Database
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
If a pre-existing structure or structure file is not present in the directory to which the database is being restored, then the prorest operation will restore automatically to ONE variable extent for each Storage Area in the current directory. This is not always desirable and there are times where only the probkup volume(s) are available. The necessary information can be obtained with prorest functionality prior to running the actual restore with prorest:
1. The prorest -vp output described below, provides the originating database block size needed.
2. The prorest -list output described below, provides the sizes of all data Storage Areas but not the before-image file (Bi), which suits offline probkups.
If the probkup was an online probkup or a probkup with the -norecovery flag, then the size of the bi file at the time of the backup will be included in this backup volume, but the prorest -list output will not provide the bifilesize needed directly. The BI size can therefore be estimated by taking the difference between the sum of the Storage Areas reported by the prorest -list output, and the backup size itself. Enhancement Request OE00196570 has been filed to include Primary Recovery Information in the prorest -list output, but at this time has not been implemented.
Note: Neither the -list nor -vp arguments result in the database being physically restored. They are in effect merely reporting information from the probkup volume header.
STEPS:
1.) Find the database blocksize needed
$ prorest dbname backupfile -vp
Example:
This is a full backup of <dir>\dbname.db. (6759)
This backup was taken [ddd mmm DD HH:MM:SS YYYY]. (6760)
The blocksize is 4096. (6994)
Partial verification successfully read backup volume. (6765)
Verify pass started. (3751)
Verified nnnn db blocks in 00:00:00
Backup for <dir>\dbname.db verified ok. (6758)
2a.) Verify the size needed from the probkup volumes:
$ prorest dbname backupfile -list
Example:
Area Name: <Area_Name>
Size: 2130958090, Records/Block: 32, Area Number: 9, Cluster Size: 1
2b.) From the output calculate the space needed per Storage area for the restore:
Restore_Size = "Size_from_prorest" / RPB * databaseblocksize
266,369,761 = 2130958090 / 32 * 4
Restore_Size = 254.03 GB
The (sum) of the extents in the .st file for this Storage Area, will therefore need at least 254.03 GB for the restore.
Alternatively, the prostrct -list output can be parsed with 4GL/ABL to provide a psudo .st file ready for editing. An ABL code example is provided below.