recover database

Posted by bart.syryn on 13-May-2016 06:27

Hi, On a customer-site we have a problem. I needed to restore the Openedge database (OE 11.3 SP03). Normally there is an online backup two times a day, but someone changed the password, so the online backup isn't working anymore since a week or three..... So I got the database files from the backup (.b1, d1, .db, .st, ...). The backup is made on 05/11 10PM (22:00.). So you would think that when I start that database I have all the data that was changed during that date (11 may). But it seems that I don't have all data ..... I'm thinking that there are transaction that hasn't been written to the database .... Is there a way to get the correct database ? So the situation at 10PM when the files are backupped ? Many thanks for any suggestions. Kind regards Bart S.

All Replies

Posted by James Palmer on 13-May-2016 06:48

Hi Bart. Is after imaging enabled on the database? Do you have a copy of the after image files going back that far?

Posted by bart.syryn on 13-May-2016 06:55

Hi James,

No, after imaging is not enabled. It's just a Group-database...

Posted by George Potemkin on 13-May-2016 06:56

> But it seems that I don't have all data ..... I'm thinking that there are transaction that hasn't been written to the database ....

What made you think so?

> The backup is made on 05/11 10PM (22:00.).

Was it started or completed at 22:00 ?

Posted by bart.syryn on 13-May-2016 07:03

The backup started at 10PM.

I checked the data, and the customers has print-outs of orders made in the application that day and there aren't in the database anymore. And it just not one, but several.

Posted by George Potemkin on 13-May-2016 07:21

Do application data have the times of the orders? Then you can check the orders with the most recent times.

Posted by bart.syryn on 13-May-2016 07:28

The have not a time but I can see it at the ordernumber

Posted by George Potemkin on 13-May-2016 07:35

How large is the difference in order numbers between the print-outs and the last orders that can be found in database? How many orders per hour it used to be created? It would allow to estimate the time gap between backup and the print-outs.

Posted by bart.syryn on 13-May-2016 07:58

We know that the last order was made at about 5PM, and the last order in the database now is around 1PM. So it's about 4 hours and about 30 orders.

Posted by Keith Sudbury on 13-May-2016 08:05

The bottom line is that the backup will have all the completed transactions from when the backup started. Any transactions that started after the backup or were not completed will be backed out/missing.

Go back and make sure you have the right backup files.. it will tell you during the restore when the backup was taken. Don't trust the file times or matching file names with any log entries. Make sure your DB server time matches the clients time (especially the time zones) to avoid any confusion.

The odds of this actually being a probkup issue are extremely slim. Like winning multiple lotteries in a week slim.

Posted by George Potemkin on 13-May-2016 08:06

IMHO it means that the backup you has restored is not the one that was started at 05/11 22:00.

How do you identify the backup? Did the backup file have a timestamp in its name? Or did you use the OS timestamp of the file.

Posted by bart.syryn on 13-May-2016 08:20

But its not an online backup made with 'probkup online', but just the database files itselfs (the .d1, .b1, .st files ....)

Posted by Keith Sudbury on 13-May-2016 08:26

You can't backup a database online without using probkup... just copying the database files will not give you a valid backup.

Posted by George Potemkin on 13-May-2016 08:28

Do you have the original db.lg file as well?

Did you save the copy of these database files before you opened db?

Posted by bart.syryn on 13-May-2016 08:32

I have the Original db.lg file.

I can just restore the files and not open the database. But what do I have to do at that point ?

Posted by George Potemkin on 13-May-2016 08:40

Db.lg file contains the timestamps. Do they match your expectation?

Master block in a database store the time when db was last opened. You can use the viewdbblock.sh script to dump the contents of master block:

viewdbblock.sh your.db 6 64

ftp.progress-tech.ru/.../viewdbblock.sh

Posted by bart.syryn on 13-May-2016 08:46

No, the log-file doesnet match what I expected...

You've lost me with the master block.

I was just wondering if I just could do anything with the files that are on the backup, but it seems that this isn't a simple task....

Posted by James Palmer on 13-May-2016 09:27

"In the backup" is this an OS backup? Was the database running at the time the backup was taken?

Posted by bart.syryn on 13-May-2016 09:29

It's an OS-backup, to another hard-disk, so just a backup of the OS-files.  The database was running at that time.

Posted by Thomas Mercer-Hursh on 13-May-2016 10:50

An OS backup of a running database is not a backup.  Period.

Posted by bart.syryn on 13-May-2016 11:33

Thomas,

Thanks for the helping information........

Posted by jbr66 on 17-May-2016 09:24

If you start an online backup at 10pm, and you're going to restore that backup you  get the status of the database at 10pm. This means that if a transaction was completed at 10:01pm, that transaction will be rolled back when you startup the database after the restore.

Posted by jbr66 on 17-May-2016 09:26

Missed the fact that it was an OS backup. Always use probkup when you want an online backup.

This thread is closed