Interesting ontape command for IDS10 and 11 users
- From: bozon <curtis@xxxxxxxxxxxx>
- Date: Fri, 27 Mar 2009 13:16:11 -0700 (PDT)
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.
.
- Follow-Ups:
- Re: Interesting ontape command for IDS10 and 11 users
- From: Richard Kofler
- Re: Interesting ontape command for IDS10 and 11 users
- Prev by Date: retrieving data from the table in chunks for paging
- Next by Date: Re: retrieving data from the table in chunks for paging
- Previous by thread: retrieving data from the table in chunks for paging
- Next by thread: Re: Interesting ontape command for IDS10 and 11 users
- Index(es):
Relevant Pages
|
Loading