Operating System - HP-UX
1827073 Members
3709 Online
109713 Solutions
New Discussion

Re: Oracle (hot) backups with fbackup.

 
SOLVED
Go to solution
Nathan Jones_8
Occasional Advisor

Oracle (hot) backups with fbackup.

Is this possible? We keep getting the fbackup(1102) type errors with the Oracle data files, seeminly at random.

Fbackup doesn't seem to work very well with files in use. How do other Oracle clients handle this?
21 REPLIES 21
Steven E. Protter
Exalted Contributor

Re: Oracle (hot) backups with fbackup.

The wrong tool for the wrong job.

fbackup can not do hot backups on oracle data files, it can only sucessfully back up cold whent the database is down.

Omniback/Data Protector can do hot backups.

rman with a script(comes with oracle) can do hot backups

Veritas can do hot backups.

Tehre are obviously other products that will work, but NOT fbackup.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Oracle (hot) backups with fbackup.

Sorry to disagree with you SEP, but fbackup is fine for doing oracle hot backups, *as long as* it is a scripted hot backup (i.e. all tablespaces are put into backup mode before the backup begins, taken out again at the end, and copies of control files and archived redo logs are also taken).

I've never had a problem with fbackup and oracle datafiles... however I'm not at a system now, so I have no idea what your error is... is it an error or a warning? Is it accompanied by a message of any kind?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Nathan Jones_8
Occasional Advisor

Re: Oracle (hot) backups with fbackup.

Thank you for the replies.

Duncan, the problem is that if there is Oracle activity at a time when the backups are being run, ie a job running after hours, then fbackup will fail to backup whatever file(s) happen to be in use. Keep in mind that even in hot backup mode, the oracle datafiles are still active, they are not "frozen" as it commonly thought.

For us, this doesn't happen very often as most of our clients are 9-5 type. But on that occasion where there is activity at night in the database, random datafiles will fail to backup.
Procnus
Frequent Advisor

Re: Oracle (hot) backups with fbackup.

We use fbackup to do hot backups of our Oracle Financials system. It's all scripted to first put the tablespace into backup mode, copy sideways to another disk partition (using cp ) and gzip and then fbackup the copy. We've had no problems with this method.

Cheers
Steven
A. Clay Stephenson
Acclaimed Contributor

Re: Oracle (hot) backups with fbackup.

Given that the typical case is 9-5, let me suggest an alternative that has almost all of the uptime of hot backups with all the "warm, fuzzy" of cold backups.

1) Shutdown the database.
2) Using the OnlineJFS vxfs mount option, snapof=, make a snapshot mount of all your Oracle filesystems. This takes only a few seconds per filesystem.
3) Restart the database.
4) Backup the snapshots.
5) Umount the snapshots.

Steps 1-3 typically take under two minutes and normal operations can resume. The snapshots buffers typically require no more than 15% of the original filesystem used space. Moreover, using this methods you really don't care how fast the backups are because everything is running normally.
If it ain't broke, I can fix that.
T G Manikandan
Honored Contributor

Re: Oracle (hot) backups with fbackup.

fbackup works good if you are working with datafiles for the hot backup.

Make sure you put the tablespcae into backup mode.
Are you only backing up the Oracle data files.

fbackup(1102) is unable to stat file..

It could be that you are also backing-up the other temporary files inside the dir where the datafiles also reside.


Sanjay Kumar Suri
Honored Contributor

Re: Oracle (hot) backups with fbackup.

During the entire hot backup process, do take care of archive logs which are needed for complete recovery.

Thanks.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Steven E. Protter
Exalted Contributor

Re: Oracle (hot) backups with fbackup.

Duncan and all.

The great thing about these forums is sometimes you learn something new even if you've been posting the same thing for months.

Oracle did tell me once that fbackup is not supported for hot backups. I once did do a database recovery off a fuzzy backup. I was lucky because there had been not database transactions between a scripted database bounce and my backup.

That being said, I still think fbackup is not a good tool for hot backups. The ones I mentioned are better.

I do use fbackup for backups cold. I shut the database down, make a nice fast Ultrium backup and get the database back online before anyone notices.

I would like to see a scripted hot backup fbackukp scenario. That would be most interesting and useful to all.

My guess is you probably deserve 10 points becuase the original poster is NOT using the right scripting methodology. In your shoes, I would post back for the easy bunny.

That last sentence was a small nudge to the owner of this thread.

A search of itrc shows no accessible fbackup scripts that do oracle databases hot.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Oracle (hot) backups with fbackup.

Nathan,

I'm aware that datafiles are not 'frozen' during hot backups, its simply their SCN number that isn't updated (and all changed blocks are written to redo rather than just the deltas).

That said, fbackup should still not have the problems you mention, just because the files are open.

Knowledgebase article KBRC00002820 states that the 1102 errors occur when fbackup is unable to stat the file (usually cos it has been deleted). The fact that the file is held open and is being written to by other processes should not prevent fbackup from stat'ing the file. Maybe you are hitting some other hard limit.. have you checked your syslog for any messages at the same time?

HTH

Duncan

I am an HPE Employee
Accept or Kudo

Re: Oracle (hot) backups with fbackup.

OK, now I'm doubting what I've been saying, and thinking that I've just 'got lucky' in the past!

The following reference includes a post by JRF which seems to indicate that fbackup is *NOT* going to do what we want it to in this case:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=21015

If as JRF states, fbackup examines the timestamp at the end of the backup of a particular file, and finds that it has changed (as it very probably would during a hot backup which happens at the same time as a large batch job) it marks that copy on tape as bad and tries again! However I still wouldn't expect the 1102 error messages...

Now I'm getting confused... Nathan, can you post some actual example output from the fbackup job?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Nathan Jones_8
Occasional Advisor

Re: Oracle (hot) backups with fbackup.

Thank you everyone for your replies.

Steven: I'm curious what you mean by "original poster is NOT using the right scripting methodology." We are putting all tablespaces for all instances in hot backup mode, peforming the fbackup, then taking them out of hot backup mode. The methodology for this is sound, it is fbackup that is failing to perform. If you meant something else, please explain. Oh, also, for us, cold backups, even for 30 seconds, is not a viable alternative.

Duncan, yea, you have been lucky in the past, and so have we! The backups for us will work about 98% of them time. But, as I said, every so often, it WILL fail if there is activity at night. And for backups, a 2% failure rate is unacceptable...I'm sure everyone would agree with that. Here are some of the errors:

121329: /u09/oradata/s3id/system01.dbf 532496 fbackup(3009): WARNING: File number 121329 (/u09/oradata/s3id/system01.dbf)was not successfully backed up

(Sorry, I believe I said a different error before...shouldn't have been going from memory)

The error above occurred yesterday during backup testing that we were doing during the day. 2 other datafiles also failed.
Nathan Jones_8
Occasional Advisor

Re: Oracle (hot) backups with fbackup.

Also, here something I found on metalink:

"This is just to let others know of the fix for a problem I've had to resolve. If you use SAM to set up your automated backup or write your own using the HP-UX utility fbackup you may encounter problems taking a hot backup of the data and redo log files in your Oracle database.

The way to resolve this problem is to edit /etc/sam/br/fbackup_config and increase the value of the maxretries parameter. On an N4000 with an EMC 3330 disk array I've found that maxretries = 30 does the trick. "


Anyone tried that before? I wonder if that would make a difference?
Nathan Jones_8
Occasional Advisor

Re: Oracle (hot) backups with fbackup.

Well, I answered my own question I guess. I tried it with maxretries set at 30:

121800: /u03/oradata/ifas/ifas01.dbf 10240016 fbackup(3009): WARNING: File number 121800 (/u03/oradata/ifas/ifas01.dbf)was not successfully backed up
Steven E. Protter
Exalted Contributor

Re: Oracle (hot) backups with fbackup.

Nathan,

forgive my original poster remark.

This is a most remarkable thread.

A lot of good information concerning oracle hot backups.

I would say that until I see and test fbackup scripts its better to use a tool that is designed to get good hot backups.

I have no idea what scripts you are using, please post them. Then I'll modify them and try them myself and see if I can the problem you originally reported.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Nathan Jones_8
Occasional Advisor

Re: Oracle (hot) backups with fbackup.

No problem at all Steven. As you said, this a good thread and we are just sharing info.

I have attached the scripts from out scripts directory, so feel free to take a look at them, but I dont think it will make any difference. I think that you, and many other posters from different threads, are correct. fbackup simply will not work for hot oracle backups.

We will begin exploring rman next. If anyone has any good scripts for this, I'd appreciate it if you could share them with me.

Cheers,
Nate
Yogeeraj_1
Honored Contributor

Re: Oracle (hot) backups with fbackup.

hi nathan,

have you considered doing your Oracle Database backups (always HOT)using RMAN?

with best wishes
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Solution

Re: Oracle (hot) backups with fbackup.

OK Nathan, I think we,ve established that I've been lucky! As it happens I haven't actually used this method of backup for a good 2-3 years, so at least I know I don't have to change anything now. Since then I've always used snapshot backups (as described by Clay, which *would* work with fbackup as we can be confident that no files will change on the snapshot), or RMAN.

The problem you are going to face with RMAN is that you won't be able to write straight to tape unless you have some sort of enterprise backup software which has an oracle integration component (most major products do have this: HP OmniBack/Data Protector; Veritas Netbackup; IBM Tivoli Storage Manager; Legato Networker etc.), but I'm assuming if you are using fbackup, you don't have any of these. This will mean your going to need disk space to write out to first (in RMAN the only media type you can use without a media management interface is disk), and then write this off to tape using fbackup.

You should find some simple and easy intros to RMAN in metalink - that would be my starting point.

As SEP said, the great thing about the forums is that your always learning something new! Thing is SEP thought it was him, but he was right all along and it was me!

I'm feeling suitably chastened (sic?)

Happy New Year!

Duncan

I am an HPE Employee
Accept or Kudo
Thierry Poels_1
Honored Contributor

Re: Oracle (hot) backups with fbackup.

hi,

if you've got the diskspace you can take an online backup on disk, and afterwards fbackup the copy to tape.
The big advantage is that you always have a backup online. Not feasible however for very large databases.

good luck
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Nathan Jones_8
Occasional Advisor

Re: Oracle (hot) backups with fbackup.

hello again..one question I have regarding rman:

Does it allow me to backup up the file systems and oracle database on one tape?
Emilio Brusa_1
Occasional Contributor

Re: Oracle (hot) backups with fbackup.

Hi Nathan

When you backup with fbackup you need the put begin backup mode the datafile.

only fbackup dont works and yo could have corruptions problems.

for hotbackups`online you can use Rman.

E.
Emilio Brusa_1
Occasional Contributor

Re: Oracle (hot) backups with fbackup.

You can put in the disk the datafiles (beging backup) and after send a tape with fbackup the datafiles.