Operating System - HP-UX
1752794 Members
6014 Online
108789 Solutions
New Discussion юеВ

Re: Oracle 9i and archivelog

 
SOLVED
Go to solution
Yogeeraj_1
Honored Contributor

Re: Oracle 9i and archivelog

hi again,

below an example on how you do it in your rman script. If you need further assistance, do let us know.

run {
allocate channel fs1 type disk format='/backup/rman/al/al1_t%t_s%s_p%p';
set limit channel fs1 kbytes=100000;
backup filesperset 10 archivelog all delete input;
release channel fs1;
}

Note that i am backup up the archived log to disk in the above example.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)

Re: Oracle 9i and archivelog


Wow, you guys are going way too fast for me!

Let's rewind back a few steps here. I wanna do HOT backups, but what you tell me here, is that I need to do COLD backups on a regular basis and then use rman to backup my archive logs to restore the changes since the last cold backup?

Is this the best practice for doing hot backups of Oracle, or are there better ways?

Regards,
- Viger -
Sanjay Kumar Suri
Honored Contributor

Re: Oracle 9i and archivelog

In 24x7 environment, daily online (HOT) backups along with at least one backup of ARCHIVE log is recommended.

In our setup we take two copies of archive logs onto tape. Once backup are through archive files are deleted from disks.

As previous posts suggest one also need to test the backup data and the process of restore & recovery.

sks

A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Eric Antunes
Honored Contributor

Re: Oracle 9i and archivelog

Hi Viger,

RMAN is indeed the best practice for Hot backups.

But you should consider the following before making a decision about Hot or Cold backup:

- Necessary DBA skills (Recovering from hot backups is much more complex than with cold ones);

- Restore time (depends of the number of archive log files that needs to be applied);

- Maximum data you can loose (hours of users work);

- Downtime you can have;

- Database volatility (changing speed);

- Disk space available for archive logs and budget available to buy more if they are needed.


Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Gavin Clarke
Trusted Contributor

Re: Oracle 9i and archivelog

Hi Viger,

Cold backups are much easier to get your head around. Effectively it is just
shut the database down,
copy the files.

Hot backups are much more complex, we spent some time and effort in getting them to restore.

Eric, Your advice is as always marvellous however I have to mention that your statement,
"Not since the last backup but since the last COLD backup", seems to me to be misleading.

We don't do cold backups here any more, yet we were able to restore. I'm talking with our dba now about this.

My feeling is that the archive logs just before, during and after the hot backup are useful, the earlier archive logs can be discarded (although backing them up beforehand is always a good idea). We keep a few days worth of archive logs just in case one hot backup doesn't work, this then gives us the option to go back to the previous one. I'm assuming that you do daily hot backups.

What we did for a while was a cold backup at the weekend and hot backups during the week. When we did this we kept the archive logs back to the cold backup.
Simon Wickham_6
Regular Advisor

Re: Oracle 9i and archivelog

Hi,

A 24x7 environment is fine running with hot backups and is a necessary as most companies cannot afford any downtime. I have various clients who I have integrated RMAN with third-party Media Managers so there is no point in using cold backups if this is the option you desire and meets your buisness needs.

Have you set RMAN up with repository database? The RMAN repository database contains the schema that owns the tables, indexes, and PL/SQL packages that comprise the RMAN repository, or catalog.

Regards,
Simon
Yogeeraj_1
Honored Contributor

Re: Oracle 9i and archivelog

Hi viger!

Forget about COLD backup. Just do your RMAN hot backup. if possible, backup to disk first (then backup to tape). Both Backup and Recovery will be much faster!

How big is your database?

Above all YOU must test your recovery.

also read:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96572/toc.htm


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)

Re: Oracle 9i and archivelog


Interresting reading. To me it seems possible to make a valid backup of the whole database by issuing:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE ALL INPUT

This will both backup my database AND clean out all archive logs.

The doc says:
1. Runs the ALTER SYSTEM ARCHIVE LOG CURRENT command.
2. Runs BACKUP ARCHIVELOG ALL.
3. Backs up files specified in BACKUP command.
4. Runs the ALTER SYSTEM ARCHIVE LOG CURRENT command.
5. Backs up any remaining archived logs generated during the backup.

Not quite sure I can add "DELETE ALL INPUT" to the command though, but "BACKUP ARCHIVELOG ALL DELETE ALL INPUT" is valid, so I was hoping they could be combined...

Regards,
- Viger -
Yogeeraj_1
Honored Contributor

Re: Oracle 9i and archivelog

hi again,

of course you can proceed this way.

In fact, in the same script you can include multiple commands.

#Backup the whole database
backup
tag Whole_database_hot
database;

#Switch out of the current logfile
sql 'alter system archive log current';

#Backup the archived logs
backup
archivelog all delete input
format '/backup/rman/full/fs1/al_%u.%p';


hope this helps too!

good luck and don't forget Recovery tests are most important!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Darren Etheridge_2
Super Advisor

Re: Oracle 9i and archivelog

We backup our archivelogs 2 times a day and perform a cold backup in the evenings... In addition to all of this we do a BUSINESS COPY of our Oracle DB's at NOON... just to make sure... The business copy backup is great!! it takes only minutes to do and is VERY easy to restore from!! I would definetly recommend it!!

Darren