Scripted prorest into existing database

FocusIT

Member
There is probably a really simple answer to this, but it eludes me. I want to script the restore of a backup into a pre-existing database. Doing this manually is straight forward as I just type Y when prompted to overwrite the existing database, but I cannot get it scripted as the prompt gets directed to screen or file. Either way I cannot seem to script the pressing of Y.

Any ideas how I do this?

The database is near a TB so I dont want to have to create a fresh database it each time I do this daily restore, just overwrite the current database with the latest backup.

Environment details: -

Windows 2008R2 X64 (so using DOS syntax)
OpenEdge 10.2B05 X64
 

TomBascom

Curmudgeon
If your backup uses an "extent list" file and pulls the file names from that the "y" can also go at the top of that file.
 

RickyDiaz

New Member
Hi Tom, I am using an extent list file and this works fine too. However, I'm not convinced that each of the extends are being loaded in to the database.
I am calling the prorest command like this:
prorest e:\coadb\etst3060\oa_data\open_x E:\DR_Restore\ebis\1.bk < E:\DR_Restore\CFG\3Restore.list

3Restore.list looks like this:-
y
E:\DR_Restore\ebis\2.inc
E:\DR_Restore\ebis\3.inc

And the open_x.lg file contains an entry like this:
[2014/06/12@10:24:36.893+0100] P-5932 T-4224 I : (451) Prorest session begin for martinezr-admin on batch.
[2014/06/12@10:24:36.940+0100] P-5932 T-4224 I : (1368) Full restore started.
[2014/06/12@10:24:36.940+0100] P-5932 T-4224 I : (12854) Restoring database from e:\coadb\etst3060\oa_data\open_x.db.
[2014/06/12@10:24:55.795+0100] P-5932 T-4224 I : (1369) Full restore completed.
[2014/06/12@10:25:09.866+0100] P-5932 T-4224 I : (334) Prorest session end.

How can I tell whether each of my incrementals have been restored also? It only seems to be the Full restore that has been applied.

I am running:-
Product Name : Progress
Install Path : d:\coa\oev10
Version : 10.1C
Service Pack : 03
Temp. Fix : 00
Build : 1463

Am I missing something?
Any help greatly appreciated.
Cheers,
Rick
 

Cringer

ProgressTalk.com Moderator
Staff member
I'd suggest something is wrong as I get this:
Code:
[2014/05/13@13:42:56.876+0100] P-4192       T-5912  I          : (451)   Prorest session begin for jpalmer on batch.
[2014/05/13@13:42:56.879+0100] P-4192       T-5912  I          : (7129)  Usr 0 set name to NETWORKS\jpalmer.
[2014/05/13@16:56:44.863+0100] P-4192       T-5912  I          : (6760)  This backup was taken Mon May 12 19:00:03 2014.
[2014/05/13@16:56:45.167+0100] P-4192       T-5912  I          : (1368)  Full restore started.
[2014/05/13@16:56:45.175+0100] P-4192       T-5912  I          : (12854) Restoring database from f:\database\live\icmasliv.db.
[2014/05/13@16:57:59.348+0100] P-4192       T-5912  I          : (3763)  Started restoring volume 2.
[2014/05/13@16:58:53.093+0100] P-4192       T-5912  I          : (3763)  Started restoring volume 3.
[2014/05/13@17:00:25.191+0100] P-4192       T-5912  I          : (3763)  Started restoring volume 4.

Although I use a very similar command to you.

prorest ICMASLIV p:\ICMASLIV.b00 < e:\batch\ICMASLIV.RST > e:\backup\LOGS\RESTOREICMASLIV.LOG
 

TheMadDBA

Active Member
The example from the original post was for single multi-volume backups (one distinct backup with multiple output files). If you are applying incrementals to a full restore you will need to run a different prorest command for each incremental backup set (depending on your overlap factor when the incrementals are run).

BTW - Incremental backups are the devil and should be avoided.
 
Top