Question dump and load to test database

pivert

New Member
progress 11.2

I have an obu from our live-db that I'd like to restore in our test-database. Our live db has a different structure so a simple prorest didn't work (or at least I couldn't figure out how) so I restored the obu in a temporary copy and did a dump of all files.

Is there a way to load these files in our test-db? This db also has data in it but this can be cleared. The reason why I don't want to touch the test-db too much is because it has a webserver and other stuff connected and our softwareprov
 

RealHeavyDude

Well-Known Member
What is an obu?
How did you dump the database - that determines how you will be able to load the data?

prorest behaves differently depending whether a structure description file does exist in the target directory ( where the .db file resides ):
  • If a .st file with the same name like the .db exist prorest will automatically pick it up and use it. It will either create the void database or overwrite an existing database as soon as the storage areas in the backup match the ones in the .st or the existing database. Otherwise it will bail out with an error.
  • If no .st file with the same name like the .db exists than prorest will automatically create one variable extent for each storage area in the target directory.
But, as I understand from you post you don't want the existing test database to be overwritten.

Regardless whether you dumped the source database binary or ascii you can load the dump files into an existing target database as soon as the schema for the concerned tables is matching. But you need to be aware that you might get violations of unique indexes when the dump contains records which already exist in the target database. If your load attempts to create duplicates in an unique index it will either bail out with an error message immediately - when you are performing the load with active indexes, or it the index rebuild will fail.

I'll take it that you will try to load the data ascii with active index as you don't want a downtime in your test system. If that's the case you must make sure that you will not violate any unique index.

Heavy Regards, RealHeavyDude.
 

pivert

New Member
thx for the reply. I thought obu was an universal acronym for "online backup" in the Progress-world :)
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Our live db has a different structure
How is the structure different? You can restore a backup if there is a difference in number of extents per area, but not if there is different area configuration (RPB/BPC) or number of areas.

so a simple prorest didn't work (or at least I couldn't figure out how)
What error message did you receive?

As I read it you don't care about the data in test, i.e. you don't mind blowing it away with a copy of your live DB. Is there a reason why you care about having its structure remain different? If not, give test a compatible structure and then you can just restore a live backup overtop of it.
 

pivert

New Member
There was a difference in areas so I've changed the .st file accordingly and I was able to restore it. Thx for the tip.

I don't mind overwriting the test db (after checking with everyone, something we try to do once every year) but now it seems our test is of a more recent version than our live. No wonder I get errors.

But this has brought to my attention I need to write down and test the "restore to a different location" procedure.
 
Top