LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2009, 10:00 AM   #1
kais1
Member
 
Registered: Dec 2008
Posts: 61

Rep: Reputation: 17
compress files after backup


Dear all,

I wrote a script to take export backup of my oracle database..

{code}


ORACLE_SID=MATHS export ORACLE_SID
ORACLE_HOME=/rt/klal/oracle/product/111 export ORACLE_HOME
NLS_LANG=AMERICAN_AMERICA.AL32UTF8 export NLS_LANG
PATH=$PATH/usr/ccs/bin:/usr/bin:/usr/ucb:/etc:/usr/bin;
export PATH
DT=`date +"%Y%m%d%H%M%S"`
nohup $ORACLE_HOME/bin/exp system/manager@MATHS file=/rt/wrk/backup/exp_PROD_"$DT".dmp log=/rt/wrk/backup/exp_PROD_"$DT".log full=y grants=none statistics=none &

{code}

I want to compress the dmp file after backup.. is there anyway I can do this after the completion of the script ?..

or is there anyway .. I can write a script to take the uncompressed files or the last created files from the directory and compress it ?

Please advise


Kai
 
Old 05-10-2009, 02:09 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Ummm ... of course there is:

inside your script:

bzip2 $file

Btw... code-tags on LQ are [ code ] and [ /code ]
(without the spaces inside the square brackets),
not curly brackets.



Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What's the best way to compress image files in Linux? tgardner Linux - Software 2 06-03-2009 11:39 AM
Compress files in FTP moorthygs Linux - General 3 09-12-2007 01:57 AM
Need to compress a mysql backup which cron makes lozza1978 Linux - General 2 10-27-2005 08:55 PM
Compress large files deweirdt Linux - Software 1 02-11-2004 08:18 AM
Compress Files mikeshn Programming 5 06-04-2003 01:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration