Re: Yet another DBEXPORT question.
Posted in 2001
Hi Charles,
charles.johnson@corp.supernews.com 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
If you REALLY want to MOVE ONLY those 5 gigs of dbexport files just like
that, then you have no problem with dbexport. Just change the way of
thinking:
you should not dbexport from the "localbox" to the "farbox", but you
should
dbexport on the "farbox" from the "localbox". On the "farbox", in a
directory
on a filesystem >= 5 gigs, just issue the command
dbexport -c -q mydatabase@ids_on_localbox
where "ids_on_localbox" is your Informix sever on "localbox" and it is
listed
in your sqlhosts file, along with its service in /etc/services file, on
"farbox".
In your current directory, instead of "mydatabase.exp" directory
dbexport will
create a "mydatabase@ids_on_localserver.exp" directory, and inside of it
a "mydatabase@ids_on_localserver.sql" file instead of "mydatabase.sql".
Before
dbimport you should move them in "your_database_name_of_choice.exp" and
"your_database_name_of_choice.sql" respectively.
But, if you want to compress on the fly those 5 gigs of dbexport files
and
then move them to "farbox", things are much more complicated and I have
no
solution. Not yet :)))
HTH and best regards,
Mladen
> 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)