Re: Yet another DBEXPORT question.
Posted in 2001
Thanks, Art. I will be downloading your utilities tomorrow when I get back
into work.
I don't have the option of using a tape; and besides, we have done a
dbexport once before (into a local disk directory) and it took in the
neighborhood of 6 hours. I presume the tape would be slower.
If I follow what you have written, there will be two files: <database>.sql
and copy_database.ksh?
Any way to get a feel for how large the copy_database.ksh will be?
Again, thanks; I appreciate it.
"Art S. Kagel" <kagel@bloomberg.net> wrote in message
news:3A525DCB.6BF0408C@bloomberg.net...
> You can get dbexport to write to a tape drive. Another option is to use a
> utility that will copy the tables directly from one live database to the
> other. You will need my utils2_ak package to get by dbcopy utility and
> my package utils4_ak to get the awk scripts (optionally you can use my
> dbschema replacement myschema which comes in utils2_ak instead of
dbschema).
> Then:
>
> Once the database has been created on the target machine...
>
> dbschema -d <database> <database>.sql
> awk -f mk_dbcopy.awk database.sql >copy_database.ksh> ksh copy_database.ksh target_server
>
> Art S. Kagel
>
> charles.johnson@news.accessllc.net wrote:
> >
> > There must be a better way to solve my problem than the way I have
solved
> > it, so I am looking for some advice/guidance. Pardon me if this sounds
like
> > a lot of whining!
> >
> > I have Informix 7.3.X running on two AIX 4.3.3 boxes. I want to do a
> > dbexport from the "localbox" to the "farbox," and I would like to do it
> > without having the 5gig or so of .unl and .sql files appear on the local
> > box. I see no reason to create 5 gigs "local" and move those same 5 gigs
> > "far." What I wound up doing was creating/exporting an NFS file system
on
> > the farbox, making it visible as a local directory on the localbox,
doing a
> > cd to it, and running
> >
> > dbexport -c -q mydatabase> >
> > Works fine, except I do not want the NFS connectivity all the time, so I
> > have to go through the issues exporting, making the connections at both
> > ends, whine, whine, whine.
> >
> > What I *want* to do is something like
> >
> > dbexport -c -q mydatabase | tar -cf - | rsh farbox "cd
> > /home/myhome/exports/ ; tar -xf -"> >
> > which, of course, doesn't work, since tar doesn't use both STDIN and
STDOUT
> > simultaneously, and perhaps can't parse the data stream either.
> >
> > Clearly, I don't understand how things actually work. dbexport seems
bound
> > and determined to create the mydatabase.exp directory whether I want it
or
> > not. Someone suggested that I try
> >
> > dbexport -c -q mydatabase | xargs tar -cf - | rsh farbox "cd
> > /home/myhome/exports/ ; tar -xf -"> >
> > which produces nothing either, since dbexport isn't producing a list of
> > filenames to be tar'ed, but (so I naively presume) a filename and its
> > data.
> >
> > Please, someone tell me that this is possible, and tell me how I
actually
> > do this. I will even accept a little abuse, if it is intelligent abuse.
> >
> > --
> > Cheers--
> > Charles, Machine Whisperer (but, alas, not today)