Home » RDBMS Server » Backup & Recovery » shell script for cold backup (10.2.0.3)
shell script for cold backup [message #427818] Mon, 26 October 2009 00:29 Go to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
Operating system:Linux
Database version:10.2.0.3

I want to create script that take location of datafile,redolog file,controlfile from database and copy or backup the file from that location.I dont want script use separate copy command for
each file in that location.

eg:

loc1=/home/oracle/product/10.2.0/dbf
loc2=/home/oracle/product/10.2.0/ctl
loc3=/home/oracle/product/10.2.0/redo

tar -cvzf backup.tar.gz loc1 loc2 loc3

I don't know it is possible or not.Please guide me.
Re: shell script for cold backup [message #427821 is a reply to message #427818] Mon, 26 October 2009 00:52 Go to previous messageGo to next message
Michel Cadot
Messages: 63817
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes it is possible if you have all your files in only 3 directories.

By the way, it is not useful to backup redo logs.

Regards
Michel
Re: shell script for cold backup [message #427823 is a reply to message #427821] Mon, 26 October 2009 00:57 Go to previous messageGo to next message
ranvijaidba
Messages: 71
Registered: May 2008
Location: Bangalore
Member
please tell how we can retrieve only location from script and store into variable.
Re: shell script for cold backup [message #427829 is a reply to message #427823] Mon, 26 October 2009 01:45 Go to previous messageGo to next message
Michel Cadot
Messages: 63817
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
v$datafile, v$log, v$parameter for parameter controlfiles...

Regards
Michel
Re: shell script for cold backup [message #427830 is a reply to message #427823] Mon, 26 October 2009 01:45 Go to previous messageGo to next message
Michel Cadot
Messages: 63817
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
But don't try to reinvent what has already be done by hundred DBA and is on the web. Just search for it.

Regards
Michel
Re: shell script for cold backup [message #427900 is a reply to message #427818] Mon, 26 October 2009 05:58 Go to previous message
Mahesh Rajendran
Messages: 10671
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>please tell how we can retrieve only location from script and store into variable.
Look into RMAN cold backup. It just as easy like a hot backup.
Previous Topic: Catalog errors
Next Topic: Error while creating duplicate database with RMAN
Goto Forum:
  


Current Time: Fri Sep 30 19:18:55 CDT 2016

Total time taken to generate the page: 0.33428 seconds