Hot Backup Mannual Pls review for 9i
Hi All,
I am a forms developer for 9 years and new to dba/backup. I have to review a mannual hot backup for a 9i database in Solaris.
There 2 scripts
1) Script to backup all data files (system, users...) runs once in a day and Ftp to a ftp server
2) Script which runs every one hour which takes a backup of redo log files, archive files and control file. And this is ftp to a ftp server.
Q1 Does this good enough to recover the data up to last one hour ?
Q2 Here is my Script 2. Is this correct?
sqlplus "/ as sysdba" << EOF
alter system switch logfile;
EOF
# Sleep for sometime, till the log file is complete
sleep 60
sqlplus "/ as sysdba" << EOF
! rm -Rf /backup/OHotBackup/XX/arch
alter database backup controlfile to '/backup/OHotBackup/XXctrl.ctl';
! cp -r /opt/oracle/product/9.2.0/dbs/arch /backup/OHotBackup/XX
! mv /backup/OHotBackup/XX/ctrl.ctl /backup/OHotBackup/XX/arch/ctrl.ctl
! cp -r /opt/oracle/product/9.2.0/oradata/XX/*.log /backup/XX/arch
! compress /backup/OHotBackup/XX/arch/*.*
! rm /backup/OHotBackup/XX/arch_files.tar
! tar -cvf /backup/OHotBackupXX/arch_files.tar /backup/OHotBackup/XX/arch
select to_char(sysdate,'mm-dd-yyyy:hh:mm:ss.ss') endtime from dual;
disconnect
exit
Thanks in Advance. I read that RMAN backup is better than mannual but for some reasons my company is using this script.
Rajesh ALex
Hi Tom,
Thanks for the reply. First script backs up all the data files.
Here is the script.
PATH=$PATH:$ORACLE_HOME/bin
sqlplus "/as sysdba" << EOF
select to_char(sysdate,'mm-dd-yyyy:hh:mm:ss.ss') astarttime from dual;
SET TERMOUT OFF
SET FEEDBACK OFF
set serveroutput on
SPOOL /opt/oracle/admin/BackupScripts/CopyFiles.sql
declare
cursor c1 is
select distinct(tablespace_name)
from dba_data_files;
cursor c2(ts_name in varchar2) is
select file_name
from dba_data_files
where tablespace_name=ts_name;
data_rec dba_data_files.file_name%type;
ts_rec dba_data_files.tablespace_name%type;
begin
open c1;
loop
fetch c1 into ts_rec;
exit when c1%notfound;
dbms_output.put_line('alter tablespace '||ts_rec||' begin backup;');
open c2(ts_rec);
loop
fetch c2 into data_rec;
exit when c2%notfound;
dbms_output.put_line('!cp -p '||data_rec||' /backup/OHotBackup/OFDAP');
end loop;
close c2;
dbms_output.put_line('alter tablespace '||ts_rec||' end backup;');
end loop;
close c1;
dbms_output.put_line('ALTER SYSTEM ARCHIVE LOG CURRENT;');
dbms_output.put_line('!rm /backup/OHotBackup/OFDAP/ht.ctl');
dbms_output.put_line('alter database backup controlfile to ' || '''/backup/OHotBackup/OFDAP/ht.ctl'''||';');
dbms_output.put_line('alter database backup controlfile to trace;');
dbms_output.put_line('!rm /backup/OHotBackup/OFDAP/initOFDAP.ora');
dbms_output.put_line('!cp -p /opt/oracle/product/9.2.0/admin/OFDAP/pfile/initOFDAP.ora /backup/OHotBackup/OFDAP');
dbms_output.put_line('!rm /backup/OHotBackup/OFDAP/*.dbf.Z');
dbms_output.put_line('!compress /backup/OHotBackup/OFDAP/*.dbf');
end;
spool off;
!perl -pi -e 's/Statement processed.//g' /opt/oracle/admin/BackupScripts/CopyFiles.sql
@/opt/oracle/admin/BackupScripts/CopyFiles.sql
select to_char(sysdate,'mm-dd-yyyy:hh:mm:ss.ss') aendtime from dual;
disconnect
Thanks
Rajesh
Similar Messages
-
Hi,
I was under the impression that while doing hot backup, one must maintain all the archive logs since the start of the backup, in order to be able to restore the backup.
However, recently when I did a restore of my hot backup, it asked me for archive logs generated prior to the beginning of the hot backup.
How can this be explained?
Thanks,
PrachiPlease read my first description - this is exactly
what I have understood from Oracle docs. But let me
explain with example.
When I begin by hot backup, the log number is say 80
and at the end of hot backup, it is 90. That means to
restore and recover the backup, I should need archive
logs from 80 to 90 (as per Oracle docs). In my case,
the recovery asked for archive log 66 and onwards.
Hence the need for clarification.
Why log 66 and not 80?I guess some of backup datafiles are older ones, they maybe were from last backup.
Can you check the time of all backup datafiles? -
Metalink Ids for hot backup clonning
Hi i want to perform hot backup clonning in R12 single node to single node and single node to multi node,
Please tell me the metalink idsHi,
Please see these docs.
Cloning Oracle Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database [ID 760772.1
Cloning E-Business Suite Using Hot Backup for Minimal Downtime of Source Environment. [ID 362473.1]
Rapid Clone Documentation Resources, Release 11i and 12 [ID 799735.1]
RMAN Guides
http://www.oracle.com/pls/db112/homepage
Thanks,
Hussein -
Which is better for User Managed Hot backup - running in cron or oracle scheduler
We are taking hot backup in our environment by using sql script of just begin backup, host copy and end backup
Can we use this script to be put in cron for weekly two times or to use oracle scheduler .
Which is better option and why?The answer to your question depens on your condition. Do you have more experienced Unix admin or DBA?
From my point of view cron is better becuase all you need is SQL*Plus utility and shell script:
export ORACLE_SID=...
sqlplus <username>/<password> as sysdba <<EOF
ALTER TABLESPACE .. BEGIN BACKUP;
host copy ..
ALTER TABLESPACE .. END BACKUP;
EXIT
EOF -
Hot Backup for oracle database?
Dear all,
I want to change Cold Backup to Hot Backup. Does anyone how to do Hot Backup and has some simple document I can follow? If the database is running in ARCHIVELOG mode, is the size grow very fast or other effect will overcome?
Please advice,
AmyI want to change Cold Backup to Hot Backup. Does
anyone how to do Hot Backup and has some simple
document I can follow?online/hot backup don’t need to shutdown the database we can put the database in backup mode and then start taking backup even though users database activity read/write data going on. This strategy useful if ours database goes for 24x7.
For online/hot backup the database should be in archive mode.
I hope you know how to turn on archive.Before turning on check the archive on or not.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
SQL> you may also check it by connecting to database as sys
SQL> select log_mode from v$database;
LOG_MODE
ARCHIVELOG
SQL> if yours database is not in archive mode then first enable archive,please before turning on the archive take cold backup.
SQL>shutdown immediate
SQL>startup mount
SQL>alter database archivelog
SQL>alter database open;
SQL> archive log list
Now you are able to take hot/online backup ,its upto you you use user managed backup and recovery or use RMAN oracle own shipped free tool for backup and recovery ,however my recommendation would goes for RMAN.
http://download-uk.oracle.com/docs/cd/A97630_01/server.920/a96572/toc.htm
http://www.oracle.com/technology/deploy/availability/htdocs/rman_overview.htm
ARCHIVELOG mode, is the size grow very fast or other
effect will overcome?However, the growing size pace either fast or slow everyday can be impractical it alls depends on activity of yours database operation.You will have to observe it yourself by turning on archive log its vary database to database activity.
Khurram -
Hot backups for essbase planning databases
Hi gurus
Can please tell me best advice for making hot backups of our essbase planning databases for disaster recoveries?
We try doubletake but files are locked unless essbase is put in read-only mode.
Any good tools for this? Certified stuff? Heard maybe VBE?
TIA
M.Hi,
First of all have you read the document of backing up essbase :- http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/hfm_backup.pdf
If you are taking a backup while essbase is running then you will need to put the databases into read only mode, this can be done by using a maxl script and once again to take it out of read only mode.
There are lots of 3rd party applications out there for backing up file structures, it all depends on what you want it to do and how much you want to pay.
If it is a small installation you could even script it yourself depensing on your knowledge to back up files and copy them to a san or backup drive.
Cheers
John
http://john-goodwin.blogspot.com/ -
HOT Backups for smaller databases
Should we schedule hot backups for small databases? the database size is around 1.5 GB. We have already scheduled daily FULL DB Export.
The database is Oracle 8i.RMAN> run {
2> allocate channel ch1 type disk format 'e:\rman_backup\backup%d_DB_%u_%p';
3> backup database;
4> backup archivelog all;
5> release channel ch1;
6> }
RMAN-03022: compiling command: allocate
RMAN-03026: error recovery releasing channel resources
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure during compilation of command
RMAN-03013: command type: allocate
RMAN-06172: not connected to recovery catalog database
RMAN> -
Environment configuration for Hot Backups
Hi all,
1. I am trying to create a hot backup tool based on the read-only Environment strategy ([discussed in a previous thread|http://forums.oracle.com/forums/message.jspa?messageID=3674008#3674008] ).
Now, leaving aside the EnvironmentConfig.setReadOnly(true), I have found quite a few possible other configuration options in the EnvironmentParams class and I'm wondering if there are some that I should be using.
Here are a couple of examples:
- ENV_RECOVERY
- ENV_RUN_INCOMPRESSOR
- ENV_RUN_CHECKPOINTER
- ENV_RUN_CLEANER
Would it make sense to configure any of these?
2. After creating a hot backup I have tried to test its state. Basically, the approach was quite simple:
- open a read-only env on the backup
- try to access the databases in the env
My idea is that if the above 2 ops are succeeding then there is a very good chance that the backup is correct.
Now, while playing with the above configuration options I have noticed that if I'm setting ENV_RECOVERY to false in this test environment, then any attempt to access the databases within results in a DatabaseNotFoundException.
Can someone help me understand what is happening? (basically, I cannot make a connection between recovery and access to the DBs in the environment)
Many thanks in advance,
./alex
PS: I've forgot to mention that I'm running a quite old version: 2.1.30
Edited by: Alex Popescu on Aug 13, 2009 5:50 AMENV_RECOVERY - suppresses running recovery at Environment creation. Internal parameter.
ENV_RUN_INCOMPRESSOR, ENV_RUN_CHECKPOINTER, ENV_RUN_CLEANER - disable the INCompressor, Checkpointer, and Cleaner Daemon threads.
You should not need to adjust any of these parameters for your DbBackup utility. In fact, ENV_RECOVERY is an "internal use only" parameter.
PS: I've forgot to mention that I'm running a quite old version: 2.1.30
I'm sorry to be the bearer of bad news, but as my colleague Mark Hayes stressed in a previous post, you really need to upgrade from 2.1.30 to 3.3.latest. It is highly probable that you will eventually run into bugs with 2.x and we are unlikely to (1) be willing to diagnose them, and (2) fix them. As Mark pointed out, 2.1 is 3.5 years old and the product has had a lot of improvements in that time. We are happy to answer questions on this forum relating to the latest major release, but dealing with old and crusty code is certainly going to be well below our allowable priority level.
Charles Lamb -
Hi guys,
I can't seem to search this scenario.
Can Azure be used as a Hot Backup? An on-prem server is backed up on the the Azure Cloud. When some disaster befalls the on prem server, can we switch to the cloud server?
Most document just discusses the backup and restore capabilities of Azure but not as hot backup capabilities.
Thanks,
JojoHi Jojo,
You can backup your op-promise server on Azure Cloud. Please refer to this page about how to configure it:
http://blogs.technet.com/b/systemcenter/archive/2014/05/08/using-and-monitoring-azure-backup-for-windows-server.aspx
But for Azure Backup how to work, I suggest you can post this issue on Azure back up forum for more details.
https://social.msdn.microsoft.com/forums/azure/en-US/home?forum=windowsazureonlinebackup
Regards,
Will
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Minimum privilege for hot backup
Hi,
Dears,
which privilege is required to take hot backup i want create user to take hotbackup with minimum privilege .now i take hotbackup with SYS user but this is danger because another department should be take hotbackup.
best regards
allahmoradAllahmorad wrote:
Hi,
Dears,
which privilege is required to take hot backup i want create user to take hotbackup with minimum privilege .now i take hotbackup with SYS user but this is danger because another department should be take hotbackup.
best regards
allahmoradalter database,alter system, create session is enough privileges to make vast changes in your database.So there is not such priveleges.(as fortmann suggested).
I will suggest you to use the rman for hot backup.
Hope this help :)
--neeraj -
Shell scripting for hot backup
Hi,
can you please give me shell scripting and it's explanation for taking hot backup. and which shell scripts are frequently use in real time.
thank a lot in advance.HAve you ever heard about RMAN ? Much better than reinvent the wheel.
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmquick.htm
Nicolas. -
Step by Step RMAN configuration for full hot backup daily
Dear experts,
i am new to oracle RMAN , i have gone through couple of RMAN guides for configuration ,
i have oracle e-business suite (R12.1.1) and database is ( 11.1.0.7) on red hat enterprise linux 5.3 . All of this is 64 bit.
i have a database about 175 gb which is as usual growing day by day as data entry is taking place.
Untill now we have a cold backup strategy in the midnight 3 am a script down the database and make abc.tar.gz file of 25 gb approx. . This process takes about 100 minutes. But now due to new sales system we want our database up 24/7 .
So we want to configure RMAN hot backup.
I want to take backup on disk.
daily full hot backup.
backupsets
currently database is in no-archivelog
plz help me to proceed with this .
Edited by: user13376823 on Feb 10, 2011 12:17 PMuser13376823 wrote:
Dear all,
i am using this script for my full hot backup ,
run
allocate channel c1 device type disk format '/opt/R12Backups/rman/%U';
allocate channel c2 device type disk format '/opt/R12Backups/rman/%U';
crosscheck backup;
BACKUP DATABASE FORMAT '/opt/R12Backups/rman/proddb_%u_%p_%c';
sql 'alter system switch logfile';
BACKUP ARCHIVELOG ALL DELETE INPUT FORMAT '/opt/R12Backups/rman/archlog%U';
DELETE NOPROMPT OBSOLETE REDUNDANCY =1 device type disk;
DELETE NOPROMPT EXPIRED BACKUPSET OF DATABASE device type disk ;
BACKUP AS COPY CURRENT CONTROLFILE FORMAT '/opt/R12Backups/rman/copy_of_cf_%U';
BACKUP SPFILE FORMAT '/opt/R12Backups/rman/spfile_%U';
release channel c1;
release channel c2;
1.please tell me that it is covering all aspects of a backup . Can i do complete recovery with this backup in case of disaster?
Define "all aspects".
2. i only get database and controlfile backup at my location. There is no backup of archivelogs , What happened with
that ?Without seeing the output that rman generated from running the above block, and without seeing all of the persistent rman settings, it is impossible to diagnose anything. I will say that your script looks overly complex.
Just to give you a point of comparison, here's my setup. First the persistent rman settings. Take note of anything that is NOT marked as "default";
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 3;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/ora00/app/oracle/product/10.2.0/db_1/dbs/snapcf_vlnxora1.f'; # defaultAnd here is my basic "full backup" script
[oracle@vmlnx01 bin]$ cat rman_full.scr
connect target /
show all;
run {
backup incremental level 0 database tag='bkup_vlnxora1_full';
backup archivelog all not backed up 2 times tag='bkup_vlnxora1_arch';
delete noprompt archivelog all backed up 2 times to device type disk;
list backup summary;
report obsolete;
quit -
Why archivelog mode is mandatory for hot backups.
Hi,
Why the database should be put in archivelog mode when we take hot backups. What happens actually. Why can't we put in noarchivelog mode and take hot backups?Suppose you are not using RMAN then you must put your tablespaces in backup mode. Otherwise the backup you can take will be unrecoverable.
In order to recover from a Hot Backup you have to do followings
- Restore your Hot Backup
- Recover the database - here, the archive log files are important
How does Oracle know what has to be recovered from archivelogs?It looks at the SCN.
If you never put your tablespaces in backup mode then SCN would not be frozen and Oracle wouldn't know what has to be recovered.
Talip Hakan Ozturk
http://taliphakanozturken.wordpress.com/ -
Is it possible to apply hot backup to do data refresh for another env?
There are 2 environments (UAT & DEV), now I am running HOT BACKUP on UAT environment. Is it possible I use the hot bacukp data file and apply into DEV environment. So that I can do the data refresh in DEV?
Please advice,
Amyyou have two option either go with Duplicate Database or go with Restore And Recover Database to Another Host.
Khurram -
RMAN script for RAC Hot Backup
Anyone who want to share an RMAN script to Hot Backup a 9i RAC Database.
Try to remove the DURATION option in your script.
Here more details about that part.
http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta009.htm#i1010261
Bye, Aron
Maybe you are looking for
-
Need Help in Disabling Delivery Report Sound
Hi, I am having Nokia 5630 Xpress Music phone and I am using it for almost 2 years. Recently it was freezing badly and I had reset it to factory settings. Now when I receive the delivery report for my text message sent, it comes with a message notifi
-
Help! I accidentally uploaded my entire photo library -- 18,000 photos -- to the Book I am working on. Now everything runs slow, and I can't figure out how to get them out quickly. It takes several seconds to just delete one photo. I don't want to de
-
Increase in FSB vs Increase in Multiplier
is there any difference in performance ? by this two ? FSB : 100 Multiplier : 30 Core Speed : 3000Mhz or FSB : 200 Multiplier : 15 Core Speed : 3000Mhz
-
Is it possible to call a webservice with just the url to its WSDL
hi all can anyone tell me if it is possible to call a webservice with just the url to its WSDL file. must we create the proxy class for webservice client? thanks
-
Topic Text disappears when upgrading to RoboHelp 7
When upgrading a French webhelp project from RoboHelp 5 to RoboHelp 7, the topic text is deleted in context-sensitive help topics. When you click the Help button in the application, the topic appears, but is blank. When I rechecked the input, the top