Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, vitaliy.

Asked: February 21, 2007 - 2:14 am UTC

Last updated: December 16, 2010 - 2:10 am UTC

Version: 8.1.7

Viewed 1000+ times

You Asked

Hi Tom ! I have a question about backup database Oracle (non archive mode) . Ealier we made backup on
running database (without stopping database) -just did copy control files and another files of database (*.ora,*.dbf). But recently I read about cold and hot backup of database. There writes about stopping database in case of cold backup and
transfer tablespaces in mode backup in case hot backup (My database is not in arhivelog mode-and I can't make hot backup). Is it right make backup without stopping database and what consequencies could be by just
coping files of database. Could I restore database from this files or not ? Thanks in advance. Sorry for my English It is not my native language.

and Tom said...

... Ealier we made backup on
running database (without stopping database) ...


No, what you did was waste time and IO resources, since the files you copied are basically....

USELESS.


in no archive log mode, you have to shutdown to backup.

in no archive log mode, you have to be willing to tell your management "we will lose ALL work performed since our last backup someday - not might, WILL"

Rating

  (7 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Pithy

DJB, June 26, 2007 - 5:23 am UTC

and to the point as ever. I wonder could you tell me why the backed up datafiles in a hot backup show the previous day's date, while the backed up control file shows the time the backup completed ?
Tom Kyte
July 02, 2007 - 9:15 am UTC

depends on the OS, the OS timestamps are meaningless and not used by Oracle.

some OS's update timestamps only when files are closed, datafiles are not closed all that often.

Timestamps

A reader, July 05, 2007 - 11:47 am UTC

Tom thanks for your response. The o/s in this case is Windows 2003.
Tom Kyte
July 05, 2007 - 1:19 pm UTC

and that is one that doesn't do timestamps like normal OS's. Ignore it, we do - we don't use them.

A Full Backup...

A reader, July 06, 2007 - 3:22 am UTC

Hi Tom,

I need to ask all about the backup.

I've read the "Oracle9i Backup and Recovery Concepts" and reading it over and over again. It is some what mind boggling to me.

Would you like to clarify the following points?

- What does a "full backup" comprises of in physical (copy of data, control & redo log files using RMAN or OS utility) and logical (data extracted using export utility) forms?
- When it is required to stop database before backup (a cold backup)?
- When it is not necessary to stop database during backup (a hot backup)?
- When database is in archive mode, what is suitable to perform, a hot backup or a cold backup?

The database is running in archive mode and number of archive log files is growing every day. One day they will fill the entire hard disk.

- What to do with these files?
- When and where these files will be used?
- Is it necessary to have a backup of these files too?

Regards.
Tom Kyte
July 06, 2007 - 12:48 pm UTC

export and expdp are NOT BACKUP tools, they are data copy tools, they are NOT BACKUPS.


full backup: http://docs.oracle.com/docs/cd/B10501_01/server.920/a96519/glossary.htm#432659

as stated there, a full backup does not refer to "how much" but rather "how" a single file is backed up.

Now, in general, many people (self included) think of a full backup as:

a) control file backup
b) plus datafile backup
c) plus any archives needed to restore and recover b with
d) parameter file backup

you never never never backup online redo logs. never.



b) a cold backup by definition means the database is cold, stopped, not hot, cold. You ALWAYS stop the database before a cold backup by definition.

c) because that is what the word 'hot' means - that the database is in fact 'hot', up, running, doing stuff, not cold.

d) hot, only - if you ask me.


archives: you need to keep all archives that were generated during/after all of your backups. You can release these archives (remove them from tape, disk, whatever) AFTER you remove the backups they are needed to be applied to (because you keep AT LEAST your least two or three backups).

You backup these archives ASAP - and get them mirrored on another set of disks elsewhere or on tape elsewhere. They are crucial for recovery. Just as you do not keep your backup on the production machine (because if the production machine burns up in a fire....) you do not want to keep your archives there long either.

OS Full Backup

Laxman Kondal, October 09, 2007 - 3:47 pm UTC

Hi Tom,

We have one Oracle9i instance on Windows server since 2001 and recently I saw it is backed up by OS Full Backup.

But I am not sure what's the advantage and disadvantage of OS full backup. Can this full OS backup be ever used for starting up any Oracle version on same or different OS/Windows Server?

If not then what's the intelligence behind taking OS full backup.

Do windows shut down Oracle before backup or just copy?

If OS is reinstalled on same or different server then will Oracle work or need some configuration?

Thanks and regards.

Cold Backup in NoArchiveLog mode

Yogesh Purabiya, December 11, 2010 - 8:19 am UTC

Oracle 8.1.7 on Windows/2003 Enterprise Edition AND
Oracle 10.1 on Windows/2003 Enterprise Edition

Both the instances (on separate machines) are in NoArchiveLog mode.

(1) If we take export every day and cold backup every week - which is better for recovering the "data" ?
(2) In Windows environment, what command to use for copying files for cold-backup ? I am asking this since I udnerstand that Oracle requires some specific format of the datafiles to be maintaind, and I do not know whether copy, xcopy & RoboCopy commnads maintain that requried format.
Tom Kyte
December 11, 2010 - 2:33 pm UTC

1) neither is - they are both point in time things. You will LOSE data with either approach.

exports are not backups, backups are backups. You would be wise to NOT use export and think of it as a backup - it isn't. There is a high probability you cannot import those exports - have you ever tried?

(most common error - people using "consistent=Y" when exporting using SYS or SYSDBA. Neither of them can do consistent exports - ever.

2) for cold backup - you can copy however you like, we don't care, we are not even running. copy would maintain the format of the original file - there is nothing special there for a cold backup. It would only be during a hot backup that you would have to think about this - since windows won't let you copy a file that is opened by someone else.




Actually , what you should be thinking about is how to get these databases into archive log mode. It is only a matter of time before you suffer a severe data loss. Just a matter of time.

Cold Backup in NoArchiveLog mode

Yogesh Purabiya, December 15, 2010 - 9:42 pm UTC

Thanks for the regular help & support.

Currenlty there is no scope for going for ArchiveLog Mode.
So, I would like to repeat the query.

If we are ready to lose some of data, which one is better ?
Meaning, which will cause more loss of data and which will cause less loss of data ?
Tom Kyte
December 16, 2010 - 2:10 am UTC

export is not backup.

backup is backup.

period. export is a tool you can use to make a logical copy of your database - it is not a backup



they will both lose data - at the same rate. export might lose everything because there is never a guarantee you can import it later.

Cold Backup in NoArchiveLog mode

Yogesh Purabiya, December 17, 2010 - 9:19 pm UTC

Thanks for the help & guidance.

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.