1752815 Members
5688 Online
108789 Solutions
New Discussion юеВ

make export script

 
SOLVED
Go to solution
tareq_2
Regular Advisor

make export script

hi all
I have rp7420 server with hp-ux 11iv1 And Oracle 10g installed, i want to backup the database to tape drive "Ultrium 215 Removable tape drive" i want to make export script
thanks
9 REPLIES 9
tareq_2
Regular Advisor

Re: make export script

i have read some forums and i found this:
exp $d_system file=/dev/ntape/tape1c volsize=0 \
buffer=100000 \
constraints=y \
grants=y \
indexes=y \
rows=y \
compress=n \
statistics=none \
full=y \
log=$LOGS/$ORACLE_SID/$LOG_DATE.log < $TOOLS/exp.input_file
sleep 120
#mt -f /dev/ntape/tape1c offline
echo " 1st export Completed. "
#
exp $q_system file=/dev/ntape/tape1c volsize=0 \
buffer=100000 \
constraints=y \
grants=y \
indexes=y \
rows=y \
compress=n \
statistics=none \
full=y \
log=$LOGS/$ORACLE_SID/$LOG_DATE.log < $TOOLS/exp.input_file
sleep 120
#mt -f /dev/ntape/tape1c offline
echo " 2nd export Completed. "
exit
is this script work in my case
please i need help
i need how to make export script????
thanks
Kenan Erdey
Honored Contributor

Re: make export script

Hi,

if you want to do a cold backup, shutdown oracle. and backup your directories where reside your datafiles and archive logs by using command below. by fbackup command you can schedule your backps setting it to cron.

fbackup -f /dev/rmt/0m -i /

if you want to do it in proffesional way, you can use RMAN

Kenan.


Computers have lots of memory but no imagination
tareq_2
Regular Advisor

Re: make export script

hi Kenan.
i want to make script for my customers to make backup for database
i ask not the way to use the tape but about export command and make it as script and in this script i will but the command of the tape.
thanks
Aashique
Honored Contributor
Solution

Re: make export script

Hi,
Please check the attached script.

Thanks & Regards
tareq_2
Regular Advisor

Re: make export script

hi Aashique
thank you for support
this is your script:


export ORACLE_HOME=/appl/oracle/product/10.2
export PATH=$ORACLE_HOME/bin:/usr/contrib/bin:/usr/bin:.
. /appl/oracle/.profile

export org_dir=/exp_bkup
export logdir=/exp_bkup/log
mkfifo $org_dir/exp_fifo_file


gzip > $org_dir/DB_full_`date "+%y%m%d"`.dmp < $org_dir/exp_fifo_file &
sleep 5

exp file=$org_dir/exp_fifo_file log=$logdir/DB_full_`date "+%y%m%d"`.log statistics=none direct=y full=y <>
my question if could help me what is the change i will made in this script to be compatiple with my oracle directory
becuase i dont know what this lines mean:-
=========>>
export org_dir=/exp_bkup
export logdir=/exp_bkup/log
mkfifo $org_dir/exp_fifo_file
=======<<
is this a Directories must i make it(org_dir),(=/exp_bkup),(/exp_bkup/log)
and thanks again
Aashique
Honored Contributor

Re: make export script

Hi,
No you can create directory in your own way.
you can change the /exp_bkup directory anywhere you want.
And database username/password@dbname need to change.Other all are ok.

Thanks & Regards
tareq_2
Regular Advisor

Re: make export script

hi Aashique
big thanks for you
i have just one question
can i write another line to the script to but the backup to the tape drive and what is the command.
regards
Aashique
Honored Contributor

Re: make export script

Hi,
tar cvf /dev/rmt/0mn /exp_bkup

Thanks & Regards
tareq_2
Regular Advisor

Re: make export script

the script what is attached is helpful
thanks for you Aashique
best regards