Question about backup/Restore with "-d" option
Posted in 2014
A user testing ontape on 11.70 made a level-0 archive, dropped a database, shut down the instance and ran "ontape -r -d" — but the restore backed up and replayed the logical logs still in the engine, which contained the DROP, so the database was gone again. Replies explained this is expected behaviour. Suggested remedies: use archecker to extract the dropped table from the archive and logs up to just before the log containing the drop, or do a physical-only restore (onmode -ky; ontape -S to save logs; rename/hide the unwanted trailing logs; ontape -p; ontape -l), noting whole logs only — no point-in-time recovery with ontape.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore
Hi to all,
i wanted to learn more about backup/restore with ontape so i'm trying to
"play" with it on a test machine with informix 11.70 (virtual appliance)
so this is what i did :
i configured the instance to use directories for backup and restore TAPEDEV
and LTAPEDEV
i made a L0 backup
i dropped a database
i shtudown the instance
i did : ontape -r -d
and all begun normally but i see that informix is making backups of logs and
then restoring them, the result is that i cannot find the database i dropped.
somebody can explain it to me please ?$
thank you in advance
Err... you see logical log backup once you call the restore? That's
expected... It's the logical logs that exist in the engine and that were
not saved yet.
That log(s) will contain the drop database.
When you restore it applies them and so the database is dropped...
I don't see any issue with this behavior...
On Fri, Feb 7, 2014 at 5:59 PM, SMITH JOHN <daylight@webmails.com> wrote:
> Hi to all,
>
> i wanted to learn more about backup/restore with ontape so i'm trying to
> "play" with it on a test machine with informix 11.70 (virtual appliance)
>
> so this is what i did :
>
> i configured the instance to use directories for backup and restore TAPEDEV
> and LTAPEDEV
>
> i made a L0 backup
> i dropped a database
> i shtudown the instance
> i did : ontape -r -d
>
> and all begun normally but i see that informix is making backups of logs
> and
> then restoring them, the result is that i cannot find the database i
> dropped.
>
> somebody can explain it to me please ?$
>
> thank you in advance
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--001a11338efc2427c804f1d510f0
I don't understand that logs remain in the engine, i did shut down the instance before restoring my L0 (that contains the dropped database)
The log(s) after the backup... and before the stop. Regards On Fri, Feb 7, 2014 at 7:15 PM, SMITH JOHN <daylight@webmails.com> wrote: > I don't understand that logs remain in the engine, i did shut down the > instance before restoring my L0 (that contains the dropped database) > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --047d7b5d2dc6796ac104f1d5e3c1
Wow, it's a litte bit dangerous, don't you think ?
for example if i want to restore a table that was dropped just after a backup
(data not the logs), so the table is lost for good :) ?
i could restore it only if i kown exactly the logs that contains the drop
action, so i can put them away from the backup logs directory et do the
restore again, but is there a way to do so (fin the log(s) containing the drop
action, onlog ?)
regards
NO! You can extract the dropped table fro mthe archive using the archecker
tool up to the point of the logical log before the one that contains the
drop table.
Art
Art S. Kagel, Principal Consultant
ASK Database Management
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Sat, Feb 8, 2014 at 3:19 AM, SMITH JOHN <daylight@webmails.com> wrote:
> Wow, it's a litte bit dangerous, don't you think ?
>
> for example if i want to restore a table that was dropped just after a
> backup
> (data not the logs), so the table is lost for good :) ?
>
> i could restore it only if i kown exactly the logs that contains the drop
> action, so i can put them away from the backup logs directory et do the
> restore again, but is there a way to do so (fin the log(s) containing the
> drop
> action, onlog ?)
>
> regards
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11348aba3058b204f1ee09fe
But Mr Art, Archecker do use only archive L0, not the logs.
Not so, archecker can use the logs also. Art Art S. Kagel, Principal Consultant ASK Database Management Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Sun, Feb 9, 2014 at 12:58 AM, SMITH JOHN <daylight@webmails.com> wrote: > But Mr Art, Archecker do use only archive L0, not the logs. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001a11381b4e793bba04f1f32021
Hi John,
There are some more option you can use with ontape.
If you don't want to restore any of the logical logs use: ontape -p
(phyisical Restore). Then onmode -s, onmode -m.
If you want to restore only a certain number of logical logs and did not
already backuped them to tape or disk:
ontape -S (after stopping the engine and before restoring, writes alllogical logs which are defined for the server to the location of
LTAPEDEV).
You can now "hide" all logical logs, you don't want to restore (rename
or copy to another place). Remark: You only can skip logical logs at the
end of the sequence not in the middle.
All neccessary commands in short:
onmode -ky
ontape -S
mv not_wanted_log_logs to_other_name
ontape -p
ontape -l
Caveat: with ontape you can only skip whole logical logs. Point in time
recovery is not possible.
HTH, Reinhard.
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
SMITH
> JOHN
> Sent: Saturday, February 08, 2014 9:19 AM
> To: ids@iiug.org
> Subject: Re: Question about backup/Restore with "-d" option [32428]
>
> Wow, it's a litte bit dangerous, don't you think ?
>
> for example if i want to restore a table that was dropped just after a
backup (data
> not the logs), so the table is lost for good :) ?
>
> i could restore it only if i kown exactly the logs that contains the
drop action, so i
> can put them away from the backup logs directory et do the restore
again, but is
> there a way to do so (fin the log(s) containing the drop action, onlog
?)
>
> regards
>
>
>
************************************************************************
*******
> Forum Note: Use "Reply" to post a response in the discussion forum.