Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

command line script

Status
Not open for further replies.

kukuluku

MIS
May 2, 2002
56
US
Hello,

I am new to Legato Networker. I am a Oracle dba using HP-UX 11.0. I am planning to implement hot backup using unix/sql scripts.
My questions are:

1) Within my hot backup script, I need to tell Legato to backup one file or a set of files (in a tablespace). How does 'save' command work here? For single file and for a set of file names in a list file?

2) Occasionally, I need to refresh database from production to development. Therefore I need to restore all data files for the dev database. There are about 130 files scatterred in different file system. They need to be restored in different file systems in DEV box. When restore, is that a way to provide an input file with stating from and to for all 130 files?

Your input is highly appreciated.

Thanks much in advance.
 
You *can* do it that way, but I wouldn't.

The best way to backup an Oracle database is to use RMAN with the Legato NMO Module. In fact with Oracle 8i and 9i, using RMAN is the only backup method that Oracle supports.

If you really want to use a script, it's better to use a pre and post command. Here's how:

Create shell scripts to start and stop the backups.

Make sure those scripts work if executed by root.

Create a file in /nsr/res called <GroupName>.res with <GroupName> the actual name of the backup group (avoid spaces in the name.).

Put something like this is the <GroupName>.res :
type: savepnpc;
precmd:&quot;/nsr/res/StartBackup.sh&quot;;
pstcmd:&quot;/nsr/res/EndBackup.sh&quot;;

Now just change the backup command for the client to &quot;savepnpc&quot;. And You're all set.


I'm sure I don't need to remind you to snapshot your control file, switch your logfiles, cleanup your archived logs after the backup, and stuff like that.

Or you could just use RMAN and make your life a *whole* lot eaiser. Trust me.

 
How about restore command pairing with savepnpc?

If I want to use RMAN, do I need to buy Legato NMO mudule? Any idea about the cost?

Also can anyone share his/her script for backup Oracle DB using RMAN with Legato?

Many thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top