Cold backup RMAN script
DB version: 10.2.0.4Can't you find something wrong in the below mentioned the cold backup RMAN script? Improvements, corrections?
{
shutdown immediate;
startup mount;
backup database including current controlfile tag='full_bkp';
startup;
crosscheck backup;
delete noprompt obsolete device type disk;
resync catalog;
}
Should work, but you can include more 'archivelog' in the backup statement in the case where your database is running in archivelog mode. It's also a good idea to make a backup of the trace of the controlfile using "sql" controlfile alter backup database to TRACE";"
Tags: Database
Similar Questions
-
Basically I ask this question for a problem surrounding in another thread, but here go us:
Suppose we take a COLD backup. I know, not something directly related with RMAN, but further action is:
This guy says: I take a backup to cold, I copy the files to another server, on which he has made the necessary in order to start this database.
But then, since the backup and the time of the action above, time is up.
So, there are archived redologs... because the database is in archivelog mode.
And he wants to do what is obvious: use these Redos archived, to update the database at a later stage in time.
To be clear; the Oder archived are created by the source database. The target database has been copied and started, nothing else.
If the backup is a backup hot, without issue. But because the backup is cold, it is not possible, right?
My idea is that he must also take a hot backup, in addition.
I asked already, and despite the execution of the database in archivelog mode, the backup must be taken cold, backup mode for some reason. It is probably the old method, who they now want to just add redolog recovery, but without change from cold to hot.
At some point, RMAN must be running, of course.
I guess that RMAN is used for the entire operation, not "at some point" (I see no reason not to).
The cold food at the start is to make a clone. THEN, the question is asked, but can we also restore to a point more recent in time?
Yes, you can recover the "clone" until a more recent point in time as long as you do not OPEN it, and you have all necessary archivelogs. The sequence:
1 startup nomount
2 restore controlfile
3. change the editing of the database
4 restore your cold backup (do not open the database)
5. If necessary, catalogue archivelog backups
6 back to the desired point in time
7. alter database open resetlogs.
But I repeat, why did you stop your databases, if that is not necessary? (of course I think of my dozens of databases 24 x 7).
-
Behavior of abnormal (Tag Date and place of automatic backup) RMAN script
Hi all
I have 11 GR 1 material running on Sun SOLARIS 10.
The parameter default RMAN for backup of control file is on DISK (format: u02/oracle/backup/rman/control/%F.ctl)
I have the RMAN script following (L0.rman):
Run {}
allocate channels ch1 type SBT_TAPE parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt) ';
tag backup "${CURRENT_DATETIME}" additional 0 filesperset 3 format 'DB_%T_%U.dbf' database more archivelog;
output channel ch1.
}
host ' cp /oracle/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora/u02/oracle/backup/rman/$(echo $CURRENT_DATETIME) /';
This is called by the following (L0.sh) script:
#! / bin/bash
CURRENT_DATETIME = "$(date + 20 %y %m %d %H %M)»;) export CURRENT_DATETIME
export ORACLE_SID = EDWH
export ORACLE_HOME=/oracle/app/oracle/product/11.1.0/db_1
mkdir/u02/oracle/backup/rman/$(echo $CURRENT_DATETIME)
RMAN nocatalog target / cmdfile = L0.rman log = L0_EDWH_$ CURRENT_DATETIME.log
The anomalies are as follows:
1. the backupsets are created with a literal tag "${CURRENT_DATETIME}" instead of "201010051915" - why?
FYI, the command 'host' at the bottom of L0.rman successfully copies the file in the right directory (/ u02/oracle/backup/rman/201010051915 /).
2. after the backup finishes, the automatic backup for the control and spfile is taken on SBT_TAPE instead of DISK - why?
Any help will be appreciated.1. well, this $CURRENT_DATETIME is variable shell, RMAN does not interpret it (she can't and doesn't have to.) HOST calls the external commands by spawning the shell in non-interactive mode and when placing the order for her, and since you have exported the variable is available to all processes having engineered and develop properly, then files are copied in the expected location. If you remove the '; CURRENT_DATETIME export"from your shell script, you will see files copied in/u02/oracle/backup rman / / because the variable will not be in the environment of the layed shell (it will be local to the script) and will expand to the empty string. You must pass $CURRENT_DATETIME to the RMAN script as a variable substitution so that the shell expands it before calling RMAN, like this:
L0. RMAN: {code}
Run {}
allocate channels ch1 type SBT_TAPE parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt) ';
backup format tag & 1 extra strength 0 filesperset 3 'DB_%T_%U.dbf' database archivelog;
output channel ch1.
}
host ' cp /oracle/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora/u02/oracle/backup/rman / $ CURRENT_DATETIME /';
{code}
L0.sh: {code}
#! / bin/bash
CURRENT_DATETIME = "$(date + 20 %y %m %d %H %M)»;) export CURRENT_DATETIME
export ORACLE_SID = EDWH
export ORACLE_HOME=/oracle/app/oracle/product/11.1.0/db_1
mkdir/u02/oracle/backup/rman / $ CURRENT_DATETIME
RMAN nocatalog target / cmdfile = L0.rman using $CURRENT_DATETIME log = L0_EDWH_$ CURRENT_DATETIME.log
{code}Note the * & 1 * variable substitution in the RMAN script and * using * keyword in the RMAN command line.
2. control file record is taken to the same media, that the last backup, this is normal. You can't "CONFIGURE CONTROLFILE AUTOBACKUP ON the DISC" or something like that, you can only enable or disable it and specify format for various types of devices. Default device type does not play here, you are precisely the configured default device type substitution tape backup.
-
Hot backup RMAN script gives error in R12.
Hi experts
I m facing more prob when it is run the backup script. 1 day before the same script runs correctily, but now it gives me error in the rest of the command channel allocatioion runs correctly.
[root@testerp rman_log] # cat UAT_daily_rman_hot_bkp_01-11 - 14_140301.log
-bash: / root/.bash_profile: permission denied
Recovery Manager: release 11.1.0.7.0 - Production on Sat Jan 11 14:03:01, 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: UAT (DBID = 2855851979)
connected to the recovery catalog database
RMAN > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > 10 > 11 > 12 >
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-00558: error occurred during parsing of order entry
RMAN-01009: syntax error: found 'end-of-file': expected an of: "assign, modify, Advisor, backup, beginline, blockrecover, catalog, edit, copy, convert, duplication, configure, duplicate, debug, delete, execute, endinline, flashback, host, mount, open, plsql, recover, release, replicate, report, restoration, repair, resync}, together, setlimit, sql, switch, start, stop, send, display, transport, post.
RMAN-01007: column 1 row 12 file: entry standard
RMAN >
RMAN >
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-00558: error occurred during parsing of order entry
RMAN-01009: syntax error: found 'identifier': expected an of: 'for '.
RMAN-01008: the bad ID was: c2
RMAN-01007: in the file column 18 row 1: entry standard
RMAN >
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-00558: error occurred during parsing of order entry
RMAN-01009: syntax error: found 'identifier': expected an of: 'for '.
RMAN-01008: the bad ID was: c3
RMAN-01007: in the file column 18 row 1: entry standard
RMAN >
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-00558: error occurred during parsing of order entry
RMAN-01009: syntax error: found 'identifier': expected an of: 'for '.
RMAN-01008: the bad ID was: c4
RMAN-01007: in the file column 18 row 1: entry standard
RMAN >
From backup 11 January 14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID = 362 type device = DISK
channel ORA_DISK_1: backup set from incremental level 1 datafile
channel ORA_DISK_1: specifying datafile (s) in the backup set
Enter a number of file datafile = name=/d06/UAT/proddata/a_txn_data06.dbf 00021
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_data01.dbf 00392
Enter a number of file datafile = 00401 name=/d06/UAT/db/apps_st/data/a_txn_data02.dbf
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_data03.dbf 00402
Enter a number of file datafile = name=/d06/UAT/proddata/a_txn_data07.dbf 00022
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_data04.dbf 00014
Enter a number of file datafile = name=/d06/UAT/proddata/a_txn_data05.dbf 00020
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/sysaux01.dbf 00011
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/sysaux02.dbf 00018
Enter a number of file datafile = name=/d06/UAT/proddata/a_txn_data08.dbf 00023
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/undo01.dbf 00379
Enter a number of file datafile = name=/d06/UAT/proddata/sysaux03.dbf 00024
Enter a number of file datafile = name=/d06/UAT/proddata/sysaux04.dbf 00025
Enter a number of file datafile = name=/d06/UAT/proddata/a_txn_ind11.dbf 00033
Enter a number of file datafile = name=/d06/UAT/proddata/a_txn_ind09.dbf 00029
Enter a number of file datafile = name=/d06/UAT/proddata/a_txn_ind10.dbf 00030
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_ind06.dbf 00015
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_ind07.dbf 00026
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_ind08.dbf 00028
Enter a number of file datafile = 00393 name=/d06/UAT/db/apps_st/data/a_txn_ind01.dbf
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_ind02.dbf 00403
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_ind03.dbf 00404
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_ind04.dbf 00405
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_txn_ind05.dbf 00406
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_media01.dbf 00400
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/system08.dbf 00353
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/system12.dbf 00013
Enter a number of file datafile = 00352 name=/d06/UAT/db/apps_st/data/system09.dbf
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_ref01.dbf 00394
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_ref02.dbf 00407
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_summ01.dbf 00396
Enter a number of file datafile = 00395 name=/d06/UAT/db/apps_st/data/a_int01.dbf
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_queue02.dbf 00008
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_queue03.dbf 00027
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_queue04.dbf 00031
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_queue01.dbf 00399
Enter a number of file datafile = 00001 name=/d06/UAT/db/apps_st/data/system01.dbf
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/system02.dbf 00002
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/system03.dbf 00003
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/system04.dbf 00004
Enter a number of file datafile = 00005 name=/d06/UAT/db/apps_st/data/system05.dbf
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_archive01.dbf 00398
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/system06.dbf 00295
Enter a number of file datafile = 00351 name=/d06/UAT/db/apps_st/data/system07.dbf
Enter a number of file datafile = 00354 name=/d06/UAT/db/apps_st/data/system11.dbf
Enter a number of file datafile = 00288 name=/d06/UAT/db/apps_st/data/system10.dbf
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/apps_ts_tools01.dbf 00012
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_ref03.dbf 00016
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/MLSEIGL01.dbf 00019
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/RMAN01.dbf 00032
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_nolog01.dbf 00397
Enter a number of file datafile = 00314 name=/d06/UAT/db/apps_st/data/portal01.dbf
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/a_int02.dbf 00017
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/ctxd01.dbf 00006
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/olap.dbf 00010
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/odm.dbf 00009
Enter a number of file datafile = name=/d06/UAT/db/apps_st/data/owad01.dbf 00007
channel ORA_DISK_1: starting piece 1 to January 11, 14
[root@testerp rman_log] #.
###########################################################################################################################
backup script is below:
in this script, it returns error only on the rest of allocaition to control backup channel all that operate manually or with a script it works correctly.4
I m not able to find out why it returns the error distribution challnel 1 day before it works properly.
[orauat@testerp rman_script] $ cat rman_backup.sh
#! / bin/sh
#############################################################################
#ORACLE_SID = UAT
#BACKUP_START_TIME ='date + "%y" "%m" "%d"_"hour" "%m" '%s' '
#ORACLE_HOME=/d06/UAT/db/tech_st/11.1.0
#PATH = $PATH: $(ORACLE_HOME): $(ORACLE_HOME) / bin
#export ORACLE_SID
#export ORACLE_HOME
#export PATH
/D06/UAT/DB/tech_st/11.1.0/bin/RMAN catalogue rman007/rman target sys/sysuat < < EOF
run
{
allocate channels c1 device type disk format ' / d06/UAT/rman_hot_backup/Daily_backup%d_Arch_%c_%U';
SQL 'alter system switch logfile;
SQL 'alter system switch logfile;
SQL 'alter system archive log current';
remove expired archivelog all;
overlap archivelog all;
ARCHIVELOG backup all;
delete noprompt archivelog all completed before ' sysdate-4' saved 1 time to disk. "
allocate channel c2 device type disc format ' / d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
allocate channels c3 device type disk format ' / d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
allocate channel c4 device type disc format ' / d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
database backup incremental level 1;
remove the disc peripheral type of backup expired;
remove the obsolete device type disk.
output channel c1;
output channel c2.
output channel c3.
output channel c4.
}
output
EXPRESSIONS OF FOLKLORE
concerning
pritesh Rodriguez
The %U in the FORMAT provides a Unique name. You can take the backup (weekly) L0 and the (daily) L1 in the same folder OR in different folders - Oracle is not meet all the requirements on the record.
Hemant K Collette
-
The user managed based backup Rman backup cold cold vs
Hi all
I just want to know the advantages and disadvantages for backup managed user cold and cold backup Rman.
What is the best cold backup?
Some some can help me?
Thank you
Cedric Joshi
Hello
Both are good only... If you took the clod backup (managed by the user), you can also do with RMAN catalog.
I feel clod RMAN backup is good.
Reason:
======
++ with RMAN you can avoid used used block, you can only backup used blocks
++ RMAN has its own compression algorithm
++ We also have the ability to assign multiple channels to parallelize the backup
-
implement a RMAN script in a cron job with a cold way of database
Hello
I want to run the Rman script in a cron job. But my question is: is it possible to make a backup of cold with the editing of the database and change at the end of the backup?
here my sample rman script
#! / bin/ksh
export ORACLE_SID = test
ORACLE_HOME=/U01/app/Oracle/product/11.2.0/dbhome_1; Export ORACLE_HOME
PATH = / usr/sbin: $PATH: $ORACLE_HOME/bin. export PATH
ORACLE_HOME/bin/rman target = / < < EOF
Run {}
SQL! connect / as sysdba;
SQL! stop immediately;
SQL! Startup mount;
allocate channels ch1 disc type
disc format ' / u01/app/oracle/backup/full_%d_T%T_s%s_p%p'(database).
backup database archivelog;
remove obsolete;
output channel ch1
SQL! alter database open
}
"exit";
EXPRESSIONS OF FOLKLORE
Thank you
Hello
No problem, when you use the rman target / it to connect with the RMAN and RMAN fast turns. You can change your order something like that
#! / bin/ksh
export ORACLE_SID = test
ORACLE_HOME=/U01/app/Oracle/product/11.2.0/dbhome_1; Export ORACLE_HOME
PATH = / usr/sbin: $PATH: $ORACLE_HOME/bin. export PATH
ORACLE_HOME/bin/rman target = /.<>
Run {}
stop immediately;
bootable media;
allocate channels ch1 disc type
format ' / u01/app/oracle/backup/full_%d_T%T_s%s_p%p';
backup database archivelog;
remove obsolete;
output channel ch1.
ALTER database open;
}
"exit";
EXPRESSIONS OF FOLKLORE
HTH
-
Dear all,
db_version: 10.2.0.4
OS_Version:window 2003 Server
Environment: Test
I want to perform cold backup with RMAN for the same thing I want to know the following:
1. What is the script / command?
2. how to completely restore a cold backup (ex:-if I lost all my data, redo and archive)
3. is it compulsory to open the database in mode RESETLOG after recovery (since I was a backup to cold)?
Thanks in advanceA backup 'Cold' is called a 'Cohérent' backup
See http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup003.htm#sthref297Backup:
From the RMAN command line:SHUTDOWN IMMEDIATE STARTUP MOUNT BACKUP DATABASE BACKUP CURRENT CONTROLFILE -- to get the controlfile in a separate backupset
Restoration:
STARTUP MOUNT RESTORE DATABASE ALTER DATABASE OPEN
If you use a SPFILE, you can have a backup SPFILE included automatically with the backupset controlfile with CONFIGURE CONTROLFILE AUTOBACKUP on and CONFIGURE CONTROLFILE AUTOBACKUP FORMAT...
Read the documentation.
Hemant K Collette
-
Unable to cold backup with rman
Dear all
I am trying to perform cold backup with rman and my script follows
Run {}
stop immediately;
bootable media;
allocate channel dup1 device type disk;
allocate channel dup2 device type disk;
backup format ' / home/oracle/ORACLEBACKUP/%U' database;
output channel dup1;
output channel dup2;
ALTER database open;
}
When I run this script in rman it shows errord
database closed
dismounted database
Instance Oracle to close
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03002: failure of the boot command at 14/01/2011 14:31:30
ORA-12514: TNS:listener is not currently of service requested in connect descriptor
RMAN >
There is no error in my script or other
Thanks in advance
Shaikh Abdul AnthonyYou connect through an earpiece.
The listener becomes aware of the database when you turn it off.You run RMAN from the same server as the database? You need not connect through an earpiece.
Hemant K Collette
-
Cold DB RMAN backup &; restore on the other server: best procedure?
Hello
A few days ago I did a cold backup of the GR 2 CARS DB 11 with the following commands:
srvctl stop database d DBPOC
RMAN target / < < EOF
bootable media;
run
{
assign the channel c1 type disc format ' / tmp/dump/coldBkp/%T_%d_DBID%I_s%s_p%p.bkp';
backup of database TAG 'BKPCOLDDBPOCC' keep until 'sysdate + 1000';
backup current controlfile TAG 'BKPCOLDDBPOC_CTL' keep until 'sysdate + 1000';
backup spfile TAG 'BKPCOLDDBPOC_SPF' keep until 'sysdate + 1000';
output channel c1;
}
SHUTDOWN IMMEDIATE;
quit smoking;
FO %
srvctl start database-d DBPOC
srvctl start service d DBPOC
Then noticing that I need a copy of controlfile I also did:
backup current controlfile copy format in ' / opt/dump/oracle/coldBkp/currentctlfile.ctl';
He made a set of files in the file/tmp/dump/coldBkp system that I copied to another server, resembling:
20130912_DBPOC_DBID23987234897_s371_p1.BKP... plus my currentctlfile.ctl.
I copied everything on another machine in/tmp/rest, where the same structure of fs and ASM
starts existed; then run the following commands to restore this DB on
This new server:
1 / set some env variables
2 / cp initDBPOC.ora /opt/oracle/app/ora11g/product/11.2.0/db_1/dbs
3 / sqlplus: Startup nomount pfile=/opt/oracle/app/ora11g/product/11.2.0/db_1/dbs/initDBPOC.ora
4 / rman: restoring controlfile to ' / location/of/coldbackup/files/currentctlfile.ctl';
5 / rman: sql 'alter database mount;
6 / rman: catalogue start with "/ location/of/coldbackup/files";
[Type here YES]
7 / rman: restore the database;
8 / sqlplus: recover database using backup controlfile until CANCEL;
[immediately cancelled the first required archive log]
9 / sqlplus: alter database open resetlogs;
The procedure has worked.
But I'm not happy with this, I thought I could have done with RMAN. However, I discovered
e.g. a CONTROLFILE RECOVER with the HELP of BACKUP is not possible with RMAN etc etc.
and I had to swith back to sqlplus, surprisingly.
Am I missing orders RMAN should I used? Y at - it another way - more simple? -of
perform this restore/recovery simple thanks to the RMAN utility only? Or is my error in backup
the first place and I should have used other commands for backup?
Thank you very much in advance for any advice you can give me...
Kind regards
Sébastien
Hello
You can use
RMAN > RECOVER DATABASE;
and for the time being, you can use
Set until clause with TIME/SCN/restore point
HTH
-
Re: is the cold backup of rman includes onlinde redologs?
Hello
cold backup of rman includes onlinde redologs?
So that at the time of the recovery when I restore the database the redologs online also restored at this point?
Please, please add your suggestions. I read in 10g database in condition to mount everything taking the backup RMAN as cold as the oracle process overall are down we cannot copy the redologs online.
Am I correct, otherwise please someone answer me why the redologs online are not copied.
Thanks in advance
SAIA cold backup (i.e., MOUNT but not given) to RMAN does not backup online redo logs.
If you restore this backup you will need OPEN RESETLOGS to recreate the online redo logs to the target.
Hemant K Collette
PS: Oracle Documentation prefers to call an RMAN backup backs "Cohérent" when the database is mounted but the State is not OPEN. "Cold Backup" is today used for the non-RMAN methods.
Published by: Hemant K Collette on 8 January 2013 11:47
Added PS -
cold backup of rman includes onlinde redologs?
Hello
cold backup of rman includes onlinde redologs?
So that at the time of the recovery when I restore the database the redologs online also restored at this point?
I reason,.
Thanks to advanced
SairangaRMAN never backup online redo logs.
If you ever need to restore a database that had been saved cold with rman, you'd end up working with an alter database open resetlogs, which will create newspapers online brand new, empty.
-
RMAN SCRIPT TO CLEAR THE BACKUP ITEMS MORE THAN 2 DAYS...
Hello
I take a full backup of the DB using RMAN script. The script is as below:
grc_backup
{allocate channel ch1 type disc format ' / home/oragrc/GRCbkup/rman_bkp/data/%T_%c_%s_%f';}
backup database;
SQL ' ALTER SYSTEM
ARCHIVE LOG CURRENT ';
change archivelog than any overlap;
ARCHIVELOG backup all the format ' / home/oragrc/GRCbkup/rman_bkp/Archive/%T_al_%U.bck';
current backup controlfile as ' / home/oragrc/GRCbkup/rman_bkp/%T_cf_%U.bck';
}
This script is supposed to run on a daily basis via an OS script.
The problem is on a daily basis after the backup that I have to delete the backups more than 2 days. For this I use an OS script that finds the backups more than 2 days to find the command and deletes it. This script also removes the archivelogs over 2 days.
I just know that it is not advisable to delete RMAN backups and archived logs OS command when using RMAN.
I figured out the following script, I have changed the script and instance names are different please find below
CONFIGURE REDUNDANCY 2 RETENTION STRATEGY;
Configure type disk parallelism 1 backup compressed backupset device type;
run
{
allocate channel d1 type disk;
backup filesperset 5 ' format / u06/backup/EBSDEV/EBSDEV_data_t%t_s%s_p%p' database;
SQL 'alter system archive log current';
format of backup filesperset 20 ' / u06/backup/EBSDV3/EBSDV3_arch_t%t_s%s_p%p' all entered archivelog delete;
backup format ' / u06/backup/EBSDEV/EBSDEV_control%U' current controlfile;
backup spfile format ' / u06/backup/EBSDEV/EBSDEV_spfile_%U';
SQL 'alter controlfile backup trace database as "/tmp/control.trc" re-use";
OVERLAP BACKUPSET;
DELETE NOPROMPT OBSOLETE;
DELETE THE EXPIRED NOPROMPT BACKUP;
}
list summary backupset;
"exit";
Can someone suggest me this AM I correct...Yes.
Note: The OVERLAP should be OVERLAPPING BACKUP.
Hemant K Collette
-
RAC RAC CLONE OF RMAN cold backup
Hi all
I need your help in my Oracle RAC 11.2.0.2 to remote host environment cloning. Here's the disc structure
DGVOT (disc ASM holding OCR and voting disk group)
DGDATA (disk group ASM containing data files)
DGFRA (disk group ASM files for fast recovery)
Remote host is on a different location so cannot use duplicate RMAN with auxiliary channel.
Have the luxury of downtime so I wanted to take coherent RMAN (Cold Backup)
SAME structure of the disc is available on remote hosts.
11.2.0.2 CLusterware (IG) over the oracle binaries are already installed.
Can any body tell me the steps to
(1) how to take cold backup on the disk so that I can tar and copy to the remote host
(2) clone of the database on the remote host
(3) how do I add the listener for the database and other resources of this databasee clusterware.
in fact, it's my first clone CARS, so I'm well aware of the steps in detail.
I went though a lot of notes metalink but nobody fits my needs. your tips will help me a lot
Kind regardsHello
(1) how to take cold backup on disk so that I can tar and copy to the remote host.
Use Rman cold backup
At the stage of the mountain run
RMAN > backup database archivelog format '%U /dbp ";
RMAN > backup controlfile current format "%U /ctl"; Copy these to the remote host backup sets
(2) clone of the database on the remote host
Create groups of similar ASM disk as source
create pfile/spifile, starting in nomount mode instance
backup set from catalogRMAN > catalogue start with "
"; Restore controlfile
RMAN > restore controlfile;
RMAN > restore database;
RMAN > restore database;
On the success of the recovery
RMAN > sql 'alter database open;
(3) how do I add the listener for the database and other resources of this databasee clusterware.
Srvctl user to add resources
Use: srvctl
-
Hello
on 10 G R2 in AIX 6.1
I'm looking for an RMAN backup Shell script.
In addition, if we should connect like this:
How to avoid writing the password in shell script?rman nocatalog target sys/password@myDB << EOF backup as compressed backupset format '$savdir/ctl_%d_%T_%s_%p' current controlfile; exit EOF
Thank you.There is a standard 'backup' option in the control of the database.
You don't need any shell script and you're wasting your time by establishing a.-------
Sybrand Bakker
Senior Oracle DBA -
Should we backup Archivelogs special cold backups?
B version: 11.2
Version of the operating system: Solaris 5.10
Here's the script that we use for ad-hoc cold backups. Is it necessary to take the backup of the archivelogs when we do the backup to cold?
Size of the backup archivelog room is sometimes greater than the backup piece containing the full backup of the comic itself! Then lost too much disk space.
The script that we userun { allocate channel t1 type disk; sql 'alter system archive log current'; shutdown immediate; startup mount; backup full database format='/mypath/ORCL_full_%U_%T.bkp' tag='ORCL_full'; backup archivelog all tag='arch_bkp' format='/mypath/ORCL_BKP/arch_%U_%T.bkp' delete input; release channel t1; }
Hello;
A cold backup is a consistent state. If you do not have to save them. No new archived logs generated during the backup or if you're still OK.
For other types of RMAN backup, you STILL want it. This ensures that backups of data taken when the command file is recoverable in a consistent state.
Best regards
mseberg
Maybe you are looking for
-
As it can be seen in the OS 3 Web page will be available today, 13 September. However my Watch App does not seem to see the update according to the availability. When I go to software update, he repeats that my watch is up-to-date with OS 2.2.2. OS3
-
games such as 18 wheeler haulin does not start
I have windows 7 and cannot get games such as the series of 18 wheeler to play... message appears saying program does not open the window for the game to start... y at - it something I can do... I tried the games from xp with the same result
-
Original title: Windows Media Player I can't run a dvd on my computer. When I insert the dvd, a window pop up and ask 'run with Windows media player '. When I select this option, the player turns on full screen, but the dvd movie is in the upper left
-
HP ENVY Ultrabook 6-1106tx: USB - IF xHCI USB Host Controller problem
Dear Sir I hope you will be fine. My name is Rana Imran and I use HP ENVY Ultrabook 6-1106tx with Windows 8.1. I think I have the USB - IF xHCI USB Host Controller driver problem. I send you pictures of the problem. Please solve this problem. Thank y
-
Question on useless metrics in reports and dashboards
I am trying to create reports and dashboards and many of the measures that populate the list of measures to implement a metric view have a _ before the name of metrics. For example _AccessTotalCount_delta Some of the measures I have very convincing