Re: External backup/restore - an idea - comments please
Posted in 2005
Thanks for the comments.
> There's a caveat:
> Transactions that are open at backup/archive time
> can mean that at restore they need to be rolled back.
> (That happens if they cannot be rolled forward until
> commit - for whatever reason.)
> That in turn means that ON-Bar will need to restore
> those logs if you backed up and restore with ON-Bar.
> Therefore it is possible, that you need to restore
> logical logs that became full and were backed up
> well before the actual dbspaces were backed up
> with ON-Bar.
This was the catch I was looking for. Now I know it's not only logs taken
after (non-whole-system) backup that count in case of restore.
Whole system backup could be the solution because our database is quite
small (just few gigabytes) but I wanted to have a broader solution.
> One possible solution:
> For the external backup and restore you do not
> really need logical log backup and restore.
> This is because open transaction log records are
> all still contained on disk (think of long transaction
> abort scenarios because of this rule). Therefore
> when you externally backup all chunks, this will
> conatin those logs on disk. With that the external
> restore will also restore those logs and if rollback
> of open transaction is necessary, it can be done
> without (extra) log restore.
I'm glad you pointed this out. It's so obvious that logical logs also get
externally backed up, but I completely forgot about it.
All the time I was thinking how to get them from their chunks into
filesystem.
> With version 10.00 you can do the external restore
> using the appropriate ontape command for
> physical external restore ("ontape -p -e"). After that
> you can do a "logical restore" ("ontape -l"), but
> you do not really provide a proper tape. Instead
> you say you have no more tapes and it will then
> bring the server to online mode (if necessary using
> the logs on disk already restored externally).
I tried something like like this yesterday after posting an initial idea.
The difference was that I dumped logical logs to filesystem with ontape -a
(and LTAPEDEV with something like /usr/informix/logs/log) and used them for
logical restore (ontape -l) after I copied chunks back and did the external
restore (ontape -p -e). It went fine.
One thing I didn't know is I don't really have to provide logs for
"ontape -l" (I never used ontape before, onbar worked great from the first
day).
> That way you can backup all logs using ON-Bar.
> And you don't need logs for external restore.
Perfectly! I'll try this solution and report the results.
Also, thanks for the links to articles.
> You can read more about that in a developerWorks
> article that I wrote some time ago:
>
> http://www.ibm.com/developerworks/db2/library/techarticle/dm-0503fuerderer/
> Or look at this article (shorter and not by me):
> http://www.ibm.com/support/docview.wss?uid=swg21203380