Re: Yet another DBEXPORT question.
Posted in 2001
'sup, saw your later message, but fyi on the tar thingy and rsh,
I've used rsh and dump (or rdump depending on the O/S) to backup
filesystems to remote autoloaders.
Ok, here's the story.
The automounter can be your friend if you are an NFS user, there is
normally a brief delay as the nfs daemons wander off and attempt
to mount the remote, but hey.
As for tar, I see you had a cd command in your call to the remote,
try the -C parameter, change directory before operation, very usefull,
my guru came up with that one. Actually he was also the personage
who showed me lots of cool things with cpio.
the tar -cf - must have a list to process, so you might have
wanted : tar -cf - . | rsh remoteboxen tar -xCf - /somewhere
dbexport afaik will not write the output to stdout, it just writes
the the dbexport.out file to the stdout, so the tar thing would only
have copied that.
So, your best bet is the automounter, though it should be possible
to elevate the user who does the export's privs to run the mount/unmount
program.
I worked for a GIS site that used the automounter heavily and then we
just had a root cron every hour or so sweep thru the nfs mounts and
unmount the unusued ones.
brett
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
> 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)
--
-----------------------------------------------------------------
Brett's 10th law of UNIX administration...
rm is forever
-----------------------------------------------------------------
Brett Geer - UNIX Admin/Analyst/Programmer - Intratex Holdings.
Tel. +27 31 717 4000 Direct. +27 31 717 4146
Fax. +27 31 717 4001
-----------------------------------------------------------------
The little voices are talking to me again, telling me to reach
for a keyboard and type rm -rf /*
last week they had me rm -rf `echo $MANPATH | sed 's/:/ /g'`
now I fear I have no answers
-----------------------------------------------------------------