cancel
Showing results for 
Search instead for 
Did you mean: 

How to restore incremental backup on different computer?

Former Member
0 Kudos

Hello,

we want to restore a MaxDB database from incremental backups on a different computer. This fails with the error below(-111,Incompatible incremental backup).

This is the scenario:

Computer A:

1. Full data backup into file backup_full.bak

2. Do some transactions

3. Incremental data backup into file backup_inc.bak

Computer B:

1. Restore with "db_activate recover" from file backup_full.bak

2. Restore with "db_activate recover" from file backup_inc.bak

=> Step two fails

Where do I do wrong? Do I need to consider the LOGs as well? I do not want to as I want to take the backup on-the-fly.

Regards,

Jens

Error:

-24988,ERR_SQL: SQL error

-111,Incompatible incremental backup

6,Data recovery failed

Servertask Info: because Error in backup task occured

Job 1 (Backup / Restore Medium Task) [executing] WaitingT271 Result=1040

Error in backup task occured, Error code 1040 "incompatible_savefile"

Accepted Solutions (1)

Accepted Solutions (1)

JamesZ
Advisor
Advisor
0 Kudos

Dear Jens,

To restore to different database, you need to use restore with initialization option to restore a full back up, then restore an incremental backup. You can use database studio to do this.

Best regards,
James

Former Member
0 Kudos

Hi James,

thanks for the reply.

Is this possible with DBMCLI as well?

For the incremental backup I'm using:

medium_put %bak_template% %BAK_FILE% FILE PAGES 0 8 YES

backup_start %bak_template%

For the restore of the full backup I'm using:

medium_put %bak_template% %BAK_FILE% FILE DATA 0 8 YES

db_activate recover %bak_template% DATA

For the restore of the incremental backup I'm using:

medium_put %bak_template% %BAK_FILE% FILE PAGES 0 8 YES

db_activate recover %bak_template%

This ends with the error above.

Regards,

Jens

JamesZ
Advisor
Advisor
0 Kudos

Dear Jens,

It is possible to use dbmcli to do that. However as mentioned we should use "initialization" option to do that, but I am not remember how the option looks like in dbmcli.

It will be better to use database studio, also it is very easy to install database studio in your desktop to manage the remote db. You can refer to SAP note 1464618 to do that.

Best regards,
James

Former Member
0 Kudos

Hi James,

the DBMCLI command for initialization should be db_activate recover

see: http://maxdb.sap.com/doc/7_7/44/ed5673c85b67d6e10000000a155369/content.htm

I'm using that already, but it does not help.

I try the DB Studio now.

However, that is no option as we need to automate the recovery.

Regards,

Jens

Former Member
0 Kudos

Hi James,

OK, I got it after doing it via DB-Studio.

You must to the recovery in one "session".

I was closing the connection between the full restore and the incremental restore.

So, these are the DBMCLI commmands:

medium_put %bak_template_full% %BAK_FILE_full% FILE DATA 0 8 YES

medium_put %bak_template% %BAK_FILE_incr% FILE PAGES 0 8 YES

db_connect dbm,dbm

db_activate recover %bak_template_full%

recover_start %bak_template_incr%

db_restart

db_release

Thanks for pointing me to the right direction!

Jens

Message was edited by: Jens Layer

JamesZ
Advisor
Advisor
0 Kudos

Hi Jens,

Also you need to be very sure the incremental backup used is taken after the full data backup.

After closing the recovery, are you able to continue to do the recovery?

Best regards,
James

JamesZ
Advisor
Advisor
0 Kudos

Hi Jens,

by the way, database studio will finally call dbmcli command.

to find out which dbmcli command will be called after "clicking" database studio, you can trun of console option out:

in database studio-> windows->preference -> database studio
check "show console for database management commands"
then all the command the database sutdio performed will record in the bottom of database studio

So when you are not sure about any dbmcli command, you can use database studio to "generate" it for reference.

Best regards,
James

Former Member
0 Kudos

Hi James,

this is working fine:

  1. db_connect
  2. db_activate recover <FULL>
  3. recover_start <INCREMENTAL>
  4. db_restart
  5. db_release

This fails:

  1. db_connect
  2. db_activate recover <full>
  3. db_restart
  4. db_release
  5. db_connect
  6. recover_start <incremental>
  7. db_release

Regards,

Jens

Answers (0)