Skip to Content
avatar image
Former Member

Safe way to restore until a certain point of time

Hello everyone,

today we made a mistake and lost the last version of one of the thousand sources of our product on our development machine.

It's nothing we can solve via SAP version management. Because we had to deliver a fix for a customer based on an older version of that source, we thought it would be a good idea to just save a user version of the source, go back to the version the customer has, fix it and go back to the current version. What we did not consider is, that releasing a tp containing the source removes all user versions... so don't do that :-)

In my eyes, the only way to get the source back is to restore the database.

We got a backup created in september 2012 and automatic log backups from that point of time until today (yes, i know, we should do regular backups more often). To have everything from the logspace as backup, i additionally created a manual log backup for the filled log space today. Also, i created a full backup to avoid making the situation worse.


My idea now is to restore the full backup from september and, after that, import all auto log backups + the last log backup with the "restore until" option and set the until date to yesterday.

My questions now are:

- will this work?

- will the combination of auto log and manual log backup lead to any problem?

- do i have to restore every log backup separately or is there some logic in database studio, which determines, what files have to be restored?

- do you know a better way?

Database version is 7.7.06.10

Best regards,

Robert

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 28, 2013 at 05:10 PM

    Hi Robert,

    In your case since you have backup as well as logs until current working day , database restore is good option. Incase you know the time when you delete the piece of code, you may restore the logs to the timestamp before that.

    How to Restore until a specific date and time

    It is possible to restore to a specific point in time. For example you know date and time of an unwanted bigger change to the database which you want to make undone. So you can recover the database to a point in time just before this unwanted change was done. After restoring the last data backup before the particular point in time the following command can be used:

    dbmcli on DB1> recover_start <medium_name> <backup_type> <nnn> UNTIL <date> <time>

    for the example above:

    dbmcli on DB1> recover_start Log01 log 001 until 20081104 173000

    In this example the log will be restored until November 04, 17:30:00 and the database is switching to mode ONLINE afterwards automatically. Please note that the time has to be entered in 24-hour mode (5:30pm -> 17:30).

    For different options on database restore refer the link below.

    http://wiki.sdn.sap.com/wiki/display/MaxDB/HowTo+-+SAP+MaxDB+recovery+with+Database+Manager+CLI

    Regards,

    Deepak Kori

    Add comment
    10|10000 characters needed characters exceeded