Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export script: compress

Status
Not open for further replies.

joeythelips

IS-IT--Management
Aug 1, 2001
305
IE
Hi,

i have an export script which outouts my different databases and schemas to the following directory:

/nfsoradump/oracle/export

Cuurently, when the exports are created, the above directory would be around 95% full when i check it every morning.

I have recently added a new user and tablespace to one of my databases.
I want to export this data to a separate export file.

However, i am abit worried that i may not have enough space on /nfsoradump/oracle/export.

Below is part of my export script.

I want to compress some of the exports

I know there are command like tar and cpio that i can use but i am not sure how to do it.

Help would be appreciated.

DIR=/nfsoradump/oracle/export
LOG=$DIR/export.log
HISTLOG=$DIR/hist_export.log

mv $DIR/*.exp $DIR/old
cp $DIR/*.log $DIR/old

dbshut immediate > $LOG
dbstart >> $LOG
exp username/passwd@dbname file=$DIR/uniface.exp log=$DIR/uniface.log >> $LOG 2>&1
exp username/password@dbname file=$DIR/usa.exp log=$DIR/usa.log >> $LOG 2>&1
 
hi,

could you help me with the exact code using the line below please

exp username/password@dbname file=$DIR/usa.exp log=$DIR/usa.log >> $LOG 2>&1

thanks for your help
 
Add new variables for tar file name and files to be tarred

TAR=/$DIR/filename.tar
exp username/password@dbname file=$DIR/usa.exp log=$DIR/usa.log >> $LOG 2>&1
tar -cvf $TAR /$DIR/u*

It could probably be a little more simple, but I havent had my coffee yet and its early...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top