How to compress export (exp) dump files using UNIX pipes?

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Overview:
One of the biggest challenges for DBAs is the lack of disk space especially for the backups. Most often DBAs have to move the backup files from one location to other location to get room for new backups. Here we explained about a common solution for taking the export dump with compressed file size. Compression happens parallel with the export.
So we don’t need keep extra space for the uncompressed backup as it happens parallel with export.
Steps to take export with gzip and unix pipe
mknod /tmp/exppipe p
gzip -c </tmp/exppipe > schema.dmp.gz &
exp scott/<scott_passwd> file=/tmp/exppipe full=y compress=n log=schema.log
rm -f /tmp/exppipe
Steps to import dump files with gungzip and unix pipe:
mknod /tmp/imppipe p
gunzip -c schema.dmp.gz >/tmp/imppipe &
imp scott/<scott_passwd> file=/tmp/imppipe full=y ignore=y commit=y \
     log=imp_schema.log
rm -f /tmp/imppipe

Steps to take export with compress and unix pipe
mknod /tmp/exppipe p
compress </tmp/exppipe > schema.dmp.Z &
exp scott/tiger file=/tmp/exppipe tables=example compress=n log=schema.log
rm -f /tmp/exppipe


mknod /tmp/imppipe p
uncompress  -c schema.dmp.Z >/tmp/imppipe &
imp scott/tiger file=/tmp/imppipe full=y ignore=y commit=y log=imp_schema.log
rm -f /tmp/imppipe

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer