space for restore

Posted by bremmeyr on 18-Mar-2016 11:57

With a database backup file in hand that was created with probkup; how can the required amount of media space needed be determined to accommodate the result of a prorest? In addition can the values be accessed via AB\4gl code?

OpenEdge 11.5.1 64-bit Windows

All Replies

Posted by marcv on 18-Mar-2016 12:57

documentation.progress.com/.../

using prorest you can get the information you want without doing an actual restore.

prorest dbname <path to backupfile> -list   (*dbname can be anything -  you just need to specify something)

prorest  dbname <path to backupfile> -vp   will give you the additional info to calculate area size if you don't know the blocksize. alo use this if you want to know the general space needed by finding out how many db block are in the backup and then multiplying that by the block size listed.

Posted by bremmeyr on 18-Mar-2016 13:29

Block size is 4096

What unit are the size values in the response to -list?

Area Name: Primary Recovery Area

      Size: 12032, Records/Block: N/A, Area Number: 3

Area Name: Schema Area

      Size: 14848, Records/Block: 32, Area Number: 6, Cluster Size: 1

Area Name: Index

      Size: 1568704, Records/Block: 64, Area Number: 7, Cluster Size: 1

Area Name: Data

      Size: 3095488, Records/Block: 64, Area Number: 8, Cluster Size: 1

Posted by George Potemkin on 18-Mar-2016 13:34

> What unit are the size values in the response to -list?

Dbkey = number of blocks * record per block

Posted by marcv on 18-Mar-2016 13:42

The number reported by prorest -list is the number of records:

area-size = (Size / records-per-block) * database-block-size

Since 4096 is in bytes your result will be in bytes  

Posted by bremmeyr on 18-Mar-2016 14:00

Thank you. The link you provided had the exact details I am looking for

Posted by bremmeyr on 18-Mar-2016 14:14

Is there a function or command to get the -list data with ABL\4gl commands? Rather than running prorest -list and parsing the output?

Posted by Rob Fitzpatrick on 18-Mar-2016 14:30

Do you mean in the source database, from which you take the backup?  

You can get an idea of physical size by iterating over _area and _areastatus to get the area sizes.  _area._area-blocksize has the database block size for the area (it is the same for all data storage areas but can be different for the BI file).  _areastatus._areastatus-totblocks has the total area size in blocks; _areastatus._areastatus-hiwater has the area HWM in blocks.  Multiply by block size to get size in bytes.

Posted by Dmitri Levin on 22-Mar-2016 12:57

I have a 4GL program that will create .st file from the output of prorest -list

proora.com/.../create_st_file.html

Posted by bremmeyr on 22-Mar-2016 14:09

Nice Dmitri. Thank you.

This thread is closed