Interesting ontape command for IDS10 and 11 users



I just figured out how to determine what is in a backup file using
IDS10 or IDS11 ontape. I hadn't seen this anywhere else so I thought I
would post it. A little background, We use many backups for setting up
testing environments. We sometimes have to rename the chunks in the
backup or make sure they are created. Sometimes we don't have
information about exactly which chunks are in a backup file.

So here is the process.

set the INFORMIXSERVER environment variable to an instance name that
is in the sqlhost file but is not online. (I like to use an instance
on another server.) This is so Informix won't think you are trying to
do a warm restore.
touch an empty file called onconfig.null in the $INFORMIXDIR/etc/
directory. Set the ONCONFIG environment variable to onconfig.null.
Then run the following command:

gunzip -c <ontape.gz> | ontape -r -v -t STDIO &> ontape_manifest

It will error out because the root chunk name in the backup doesn't
match the one in the onconfig (which doesn't have one so it can't
match), but since you specified the -v option it prints out a nice
listing of the backup contents like so:

Archive Tape Information

Tape type: Archive Backup Tape
Online version: IBM Informix Dynamic Server Version 11.50.FC3X5
Archive date: Tue Mar 17 12:35:02 2009
User id: informix
Terminal id: /dev/pts/1
Archive level: 0
Tape device: STDIO
Tape blocksize (in k): 16
Tape size (in k): 0
Tape number in series: 1

Spaces to restore:1
[rootdbs ]
2
[plogdbs ]
3
[logdbs ]
4
[maindbs001 ]

Archive Information

IBM Informix Dynamic Server Copyright(C) 1986-2004 IBM Informix
Software, Inc.
Initialization Time 05/03/2007 15:07:50
System Page Size 2048
Version 16
Index Page Logging OFF
Archive CheckPoint Time 03/17/2009 12:34:45

Dbspaces
number flags fchunk nchunks flags
owner name
1 e0001 1 2 N B
informix rootdbs
2 e0001 2 1 N B
informix plogdbs
3 e0001 3 1 N B
informix logdbs
4 e0001 4 4 N B
informix maindbs001
5 42001 5 1 N TB
informix tempdbs001
6 42001 6 1 N TB
informix tempdbs002


Chunks
chk/dbs offset size free bpages flags pathname
1 1 0 300000 69693 PO-B /CHUNKS/root_001
2 2 0 250000 200000 PO-B /CHUNKS/phys_001
3 3 0 250000 1 PO-B /CHUNKS/log_001
4 4 0 1048575 1037372 PO-B /CHUNKS/main_001
5 5 0 256000 255947 PO-B /CHUNKS/temp001_001
6 6 0 256000 255947 PO-B /CHUNKS/temp002_001
7 4 0 1048575 1045372 PO-B /CHUNKS/main_002
8 4 0 1048576 964573 PO-B /CHUNKS/main_003
9 4 0 1048576 1048560 PO-B /CHUNKS/main_004
10 1 0 1048576 807697 PO-B /CHUNKS/root_002


If anyone knows of an easier way to generate this output please let me
know. If there isn't an easier way then we should push informix to
create a manifest option that essentially prints this out for a given
backup file. I have this in a script that generates the rename file
for me based on my criteria.

.



Relevant Pages

  • Re: backup Informix DB
    ... let me say I have experience of Informix 7 and 9 on ... will perform the backup while the database is up and running, ... It will not compress. ... Informix so that TAPE and LTAPE point to files on your hard disk (for ...
    (Fedora)
  • ISM and file-type device cloning questions
    ... Informix based application may go away in a few years). ... our previous backup method was onbar to an 8mm ... Exabyte Mammoth tape and backups took 6 or 8 tapes ... Informix-aware and is just backing up a unix file system path. ...
    (comp.databases.informix)
  • Re: Interesting ontape command for IDS10 and 11 users
    ... information about exactly which chunks are in a backup file. ... Tape type: Archive Backup Tape ... IBM Informix Dynamic Server Version 11.50.FC3X5 ...
    (comp.databases.informix)
  • Re: Windows Backup Files Recovery
    ... >>Windows Backup file format. ... > Unusable' When You Try to Restore Backup File " ... > using a stand-alone tape library " ... data recovery company to skip past a EOD marker which has accidentlly ...
    (microsoft.public.win2000.general)
  • Re: Tape vs HDD vs NAS (speed considerations and size etc)..
    ... drive inside the backup server.. ... drive tape drive? ... Exec to simply do a "synchronization" of the backup file between the HD ...
    (microsoft.public.windows.server.sbs)

Loading