To reduce the amount of space used when exporting one can compress the data as creating export file and also import data from a compressed file.
Exporting data directly to a compressed file
#!/bin/ksh
PIPE_FILE=/tmp/exp.pipe
EXP_FILE=exp.dmp.gz
# delete pipe file
rm -f $PIPE_FILE
# create a pipe file
$ mknod $PIPE_FILE p
$ gzip < $PIPE_FILE > $EXP_FILE &
$ exp file=$PIPE_FILE ….
Importing data directly from a compressed file
#!/bin/ksh
rm -f $PIPE_FILE
PIPE_FILE=/tmp/imp.pipe
EXP_FILE=exp.dmp.gz
$ mknod $PIPE_FILE p
$ gunzip < $EXP_FILE > $PIPE_FILE &
$ imp file=$PIPE_FILE ….
If you are using Oracle 10g datapump utility you can’t use the above step as the exdp checks if a file exists before writing and generates an error as the file exists.