Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: Is logfile recovery after restoring file backups possible using MAXDB?: msg#00287

db.maxdb

Subject: RE: Is logfile recovery after restoring file backups possible using MAXDB?

Hello Jos,

You should not restore your snapshot of the log volume, if that log
snapshot does not contain the latest log information available on the
log volume or on the last log backup (if the log volume is no longer
available). This is because MaxDB always uses information found on the
log volume during a log recovery. This information is also used to
determine the end of the log restore. In other words your restored
snapshot does mark the end of the log as the database knows it, even if
you have newer log information in other log backups or had newer log
information on the log volume overwritten by the restored snapshot.

Your database went to state ONLINE (Returncode 0, -8888) with just one
log backup, because it found the end, that wasn't the real end of the
log on the log volume.

Have you tried "dbmcli ... autorecover LOG ..."?

Best regards,
Tilo Heinrich
SAP Labs Berlin



>-----Original Message-----
>From: JPH.Weijers@xxxxxxxxx [mailto:JPH.Weijers@xxxxxxxxx]
>Sent: Friday, January 28, 2005 12:20 PM
>To: maxdb@xxxxxxxxxxxxxxx
>Subject: Is logfile recovery after restoring file backups
>possible using MAXDB?
>
>
>Hello,
>Instead of using the MAXDB 7.5 tools (backup_start) for a full online
>database backup I would like to use the SNAP function on our
>SAN (hardware).
>So I
>freeze the MAXDB database by suspending the log writer to create a
>consistent
>backup (data and log files) with the commands:
>
>dbmcli -D database -uUTL -u dbm,dbm util_execute suspend logwriter
>
><then I create the SNAPSHOT from the LUN's with the DATA and LOG
>volumes (comparable with split mirror) in seconds with the SAN
>functionality>
>
>dbmcli -D database -uUTL -u dbm,dbm util_execute resume logwriter
>
>Since database startup, the autologging function is switched on
>(autolog_on), so all database actions are logged in number trailered
>logfiles. After the SAN backup (in this example a tar file with the LOG
>and DATA files) I generate some load up to the point where 6 logfiles
>have been written. So I have a full database backup (the tar
>file) and I
>have the
>logfiles to perform a point-in-time recovery (rollforward).
>The next files
>are
>available for recovery:
>
>-rw-rw---- 1 sdb sdba 5701632 Jan 28 09:39 autoLOG_TESTDB.bak.002
>-rw-rw---- 1 sdb sdba 5701632 Jan 28 09:39 autoLOG_TESTDB.bak.003
>-rw-r--r-- 1 sdb sdba 999443456 Jan 28 09:40 SNAP_TESTDB.tar
>-rw-rw---- 1 sdb sdba 5701632 Jan 28 09:40 autoLOG_TESTDB.bak.004
>-rw-rw---- 1 sdb sdba 5701632 Jan 28 09:40 autoLOG_TESTDB.bak.006
>-rw-rw---- 1 sdb sdba 5701632 Jan 28 09:40 autoLOG_TESTDB.bak.005
>-rw-rw---- 1 sdb sdba 5701632 Jan 28 09:41 autoLOG_TESTDB.bak.007
>-rw-rw---- 1 sdb sdba 5701632 Jan 28 09:41 autoLOG_TESTDB.bak.008
>-rw-rw---- 1 sdb sdba 5701632 Jan 28 09:41 autoLOG_TESTDB.bak.009
>
>Test recovery:
>I shutdown the database (db_stop), I remove the DATA an LOG volume
>files and put the SAN SNAPSHOT with the DATA and the LOG volumes back
>(the restore from the full database).
>1. Restore SNAPSHOT from files as they are:
>When I (db_start) online the database, everything is normal, database
>is consistent. Everything works fine.
>2. Restore SNAPSHOT from files and recover logs (rollforward):
>I open the database in db_admin mode, open a utility session and try to
>perform
>recovery (rollforward) on the database with the 6 logfiles
>that were created
>after
>the SAN snapshot (tar file).
>After the first recover_start the database is in the db_online
>state and I
>cannot
>proceed recovery (LOG 005). I used the next commands in a
>dbmcli session to
>recover:
>
>db_admin
>util_connect
>recover_start auto_logF LOG 004
>recover_replace auto_logF /data/backup/autoLOG_TESTDB.bak005
>recover_start auto_logF LOG 005
>recover_replace auto_logF /data/backup/autoLOG_TESTDB.bak 006
>recover_start auto_logF LOG 006
>recover_replace auto_logF /data/backup/autoLOG_TESTDB.bak 007
>recover_start auto_logF LOG 007
>recover_replace auto_logF /data/backup/autoLOG_TESTDB.bak 008
>recover_start auto_logF LOG 008
>recover_replace auto_logF /data/backup/autoLOG_TESTDB.bak 009
>recover_start auto_logF LOG 009
>recover_cancel
>util_release
>db_stop
>db_start
>
>The output I get is:
>
>>recover_start auto_logF LOG 004
>OK
>Returncode 0
>Date 20050128
>Time 00094836
>Server u25
>Database TESTDB
>Kernel Version Kernel 7.5.0 Build 018-123-079-776
>Pages Transferred 424
>Pages Left 0
>Volumes
>Medianame auto_logF
>Location /data/backup/autoLOG_TESTDB.bak.004
>Errortext
>Label LOG_000000004
>Is Consistent
>First LOG Page 2700
>Last LOG Page 3517
>DB Stamp 1 Date 20050128
>DB Stamp 1 Time 00093911
>DB Stamp 2 Date 20050128
>DB Stamp 2 Time 00093928
>Page Count 817
>Devices Used 1
>Database ID u25:TESTDB_20050128_093836
>Max Used Data Page
>
>---
>>recover_replace auto_logF /data/backup/autoLOG_TESTDB.bak 005
>ERR
>-24988,ERR_SQL: sql error
>-8888,connection broken server state 10
>
>PS: I cannot use autorecovery because the backup history is incomplete
>(SAN snapshots are not registered and there are no previous
>"backup_start"
>full backups).
>
>Can someone tell me what I am doing wrong and what dbmcli
>commands I shoud
>issue to get backup/recover (point-in-time) working using our SAN
>snapshot functionality?
>
>Regards,
>Jos Weijers
>
>
>--
>MaxDB Discussion Mailing List
>For list archives: http://lists.mysql.com/maxdb
>To unsubscribe:
>http://lists.mysql.com/maxdb?unsub=tilo.heinrich@xxxxxxx
>
>

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-maxdb@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo