Operating System - HP-UX
1752815 Members
6075 Online
108789 Solutions
New Discussion юеВ

how can to compress dump file?

 
richyangsh
New Member

how can to compress dump file?

how can to compress dump file?
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: how can to compress dump file?

With the compress command.

If you want a more specific answer, we need more information. What kind of dump file? Are you talking about the crash dump that happens when your machine crashes? Are you talking about some other kind of dump?
Rasheed Tamton
Honored Contributor

Re: how can to compress dump file?

compress or gzip
or any compression tool.

If you are asking for the compression ratio, size, etc. then you have to give detailed information.
Steven E. Protter
Exalted Contributor

Re: how can to compress dump file?

Shalom,

gzip generally gives me the best compression ratio. however all these utilities are i/o intensive and take considerable time to do their jobs on large files. Take this into account when doing the compress.

I have an internal customer that does oracle backups and then uses gzip to compress them. The oracle backup runs 55 minutes. The gzip runs 4.5 hours.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John D Wimmer
New Member

Re: how can to compress dump file?

Do compress as you export you can follow
http://www.dizwell.com/prod/node/673

but you can't use it if you are using data pump.
Yogeeraj_1
Honored Contributor

Re: how can to compress dump file?

hi,

You may wish to use use both compression AND split to make my export be in many managable sized file (say 500MB).

The first step will be to create a pipe in the OS via:

$ mknod anyfilename p

and then export to that pipe.

Next, set up another process in the background that 'consumes' the contents of this pipe and puts it somewhere.

Below a script that you can use as a template.


------------------------------
#!/bin/sh

export UID=/
export FN= exp.$(date +%j_%Y).dmp
export PIPE=/tmp/exp_tmp_ora.dmp

export MAXSIZE=500m
export EXPORT_WHAT="full=y COMPRESS=n"

echo $FN

cd /your/path/to_diskArea
ls -l

rm expbkup.log export.test exp.*.dmp* $PIPE
mknod $PIPE p

date > expbkup.log
( gzip < $PIPE ) | split -b $MAXSIZE - $FN. &

# uncomment this to just SPLIT the file, not compress and split
#split -b $MAXSIZE $PIPE $FN. &

exp userid=$UID buffer=20000000 file=$PIPE $EXPORT_WHAT >>& expbkup.log
date >> expbkup.log


date > export.test
cat `echo $FN.* | sort` | gunzip > $PIPE &

# uncomment this to just SPLIT the file, not compress and split
#cat `echo $FN.* | sort` > $PIPE &

imp userid=sys/pass file=$PIPE show=y full=y >>& export.test
date >> export.test

tail expbkup.log
tail export.test

ls -l
rm -f $PIPE
--------------------------------------------------

The above script also always does an 'integrity' check of the export right after it is done with an import show=y, that shows how to use these split files with import.

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Ralph Grothe
Honored Contributor

Re: how can to compress dump file?

What kind of data consists this dump of?
If it's binary it may already leave very little levarage for compression, and the resulting compression ratio may not justify the required cpu processing time.
Madness, thy name is system administration