Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: HOW AUTOMATE EXPORT & BACKUP ?

Re: HOW AUTOMATE EXPORT & BACKUP ?

From: Graeme Farmer <g_farmer_at_halas.com.au>
Date: 2000/04/24
Message-ID: <JySM4.7512$E4.15143@newsfeeds.bigpond.com>#1/1

<ouldmoh_at_yahoo.com> wrote in message news:8dp8ip$rnh$1_at_nnrp1.deja.com...
> Hello,
>
> First: please excuse my english.

Excused

>
> Second: I want to create a file containing some shell instructions
> which automate export and then backup the database each days.
> It must contains the following:
 

> 1) from anwhere connect to the database server (locally).

NO NEED, THE ORACLE EXPORT UTILITY WILL HANDLE THE CLIENT CONNECTION.
> 2) make su - oracle then I give it:
> a) username
> b) password

NOT NECESSARY
> 3) export database (at this step I well be asked exp file...?, in
> reponse
> I hit
> on Enter button).

exp help=y
AND USE SPECIFY ALL THE NECESSARY PARAMETERS ON COMMAND LINE (OR IN SHELL SCRIPT IN YOUR CASE).
eg
exp system/manager file=/u5/ora_dump/mydump.dmp compress=n

> 4) Save the database (in order to locate the last backup of
> database the file must contain Year/days/Hour of saving, e.g.
> MySaveFile_2000/04/22H:30mn.dmp).

man date
(NB You will have to rename the export file once the export has completed if you want to name the file as a date string. You could also just look at the time stamp on the file.)

> I need all this in a file which can to be run automaticly

man crontab

> each days for example at 00:00. The script must be able to
> search automaticaly $HOME_ORACLE from /etc/oratab.

sorry, short of writing the script for you there is not much i can do to explain how to parse text files.
read up on shell scripting or PERL scripting, read up on UNIX commands, read up on ORACLE tools....
READ, READ, READ, READ, READ... ... ... ...
>
>
> Thank your for interest.
>
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Apr 24 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US