Consultor Eletrônico



Kbase P3682: What database structure does prorest use?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   05/01/2009
Status: Verified

GOAL:

What database structure does prorest use?

GOAL:

What is the default behavior if prorest is used with no st file?

GOAL:

Where is the database restored to with the prorest utility?

FACT(s) (Environment):

OpenEdge Category: Database
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

The database backup will be prorested into the chosen environment as follows:

1. If a void database has not been created with the "prostrct create" utility, but a previous copy/restore or the original database still exists and you are doing the prorest into that same directory, then the prorest overwrites the existing database, keeping the same file structure as the existing database.

2. If a void database has not been created with the "prostrct create" utility, prorest restores into that structure.

3. If a void database has not been created and the previous instance | original database does not exist, but there is a database structure (dbname.st) file in the current directory, then prorest uses the information in that st file, to first extend and then restore into.

4. If there is no structure file, no previous instance | original database, then prorest restores everything into the current working directory, generating a structure file as it goes.

An example using v9 on Unix -

1. prodb sports sports
2. prostrct list sports

Area Name: Control Area, Type 6, Block Size 1024, Extents 1, Records/Block 32
Ext # 1, Type VARIABLE, Size 32 KByte, Name: ./sports.db

Area Name: Primary Recovery Area, Type 3, Block Size 8192, Extents 1
Ext # 1, Type VARIABLE, Size 2176 KByte, Name: ./sports.b1

Area Name: Schema Area, Type 6, Block Size 1024, Extents 1, Records/Block 32
Ext # 1, Type VARIABLE, Size -352189736 KByte, Name: ./sports.d1

Area Name: Info Area, Type 6, Block Size 1024, Extents 1, Records/Block 32
Ext # 1, Type VARIABLE, Size 80 KByte, Name: ./sports_7.d1

Area Name: Order Area, Type 6, Block Size 1024, Extents 1, Records/Block 32
Ext # 1, Type VARIABLE, Size 80 KByte, Name: ./sports_8.d1

3. mkdir sports
4. mv sports.d1 sports/sports.d1
5. vi sports.st to edit the st file:

"sports.st" 8 lines, 122 characters
#
b ./sports.b1
#
d "Schema Area":6,32 ./sports/sports.d1
#
d "Info Area":7,32 ./sports_7.d1
#
d "Order Area":8,32 ./sports_8.d1

6. probkup sports sportsbak
7. prodel sports
8. prorest sports sportsbak - if you cd into the directory /sports, you see the extent has been restored there.
9. prodel sports
10. rm sports.st
11. prorest sports sportsbak

An st is generated, but the structure of original database isn't retained - all extents are placed into the one directory.