Backup of oracle database

How to backup data for ORACLE database? What are the best things to back up (how to backup database for oracle)

Three standard backup methods for Oracle databases:

1. Export/Import (EXP/IMP).

2. Hot backup.

3. Cold backup.

Note: Export spares is a logical backup, cold and hot backups are physical backups.

I. Export/Import (Export/Import)

The use of Export can be extracted from the database, the use of Import can be extracted from the data sent back to the Oracle database.

1, simple export data (Export) and import data (Import)

Oracle supports three types of ways to type of output:

(1), the table way (T way), the data will be exported from the specified table.

(2), the user way (U way), will specify the user of all objects and data export.

(3), Full database way (Full way), all objects in the database of the focus are exported.

The process of Import is the reverse of Export, which imports data files into database and exports database data to data files.

2, incremental export/import

Incremental export includes three types:

(1), “complete” incremental export (Complete)

that is, back up the three databases, for example:

expsystem/==040731.dmp. 040731.dmp

(2), “Incremental” incremental export

Backup of data changed since the last backup, for example:


(3), “Cumulative” incremental export

The cumulative export method is to export the information that has changed in the database since the last “full” export. For example:


The database administrator can set up a backup schedule that can be accomplished rationally and efficiently using the three different methods of data export.

For example, a database blocked task can be scheduled as follows:

Monday: Full Backup (A)

Tuesday: Incremental Export (B)

Wednesday: Incremental Export (C)

Thursday: Incremental Export (D)

Friday: Cumulative Export (E)

Saturday: Incremental Export (F)

Sunday: incremental export (G)

If, on Sunday, the database is accidentally corrupted, the database administrator can follow these steps to revert to the database:

Step 1: Re-generate the database structure with the command;

Step 2: Create a sufficiently large additional rollback.

Step 3: Full incremental import A:


Step 4: Cumulative incremental import E:


Step 5: Recent incremental import F :


II. Cold Backup

The cold backup occurs when the database has been shut down normally, and when it is shut down normally it will provide us with a complete database. Cold backup is a term for copying critical files to another location. Cold backups are the fastest and safest method for backing up Oracle information. The advantages of a cold backup are:

1, it is a very fast backup method (just copy the files)

2, it is easy to archive (a simple copy will do)

3, it is easy to restore to a certain point in time (just copy the files back)

4, it can be used in conjunction with archiving methods to do an “optimal” restoration of the database. “Recovery.

5, low maintenance, high security.

But cold backup also has the following shortcomings:

1, when used alone, can only provide to “a point in time” recovery.

2, and then implement the backup process, the database must be backed up and can not do other work. That is, in the cold backup process, the database must be closed.

3, if the disk space is limited, can only be copied to tape and other external storage devices, the speed will be very slow.

4. It cannot be restored by table or by user.

If possible (mainly to see the efficiency), you should back up the information to disk, and then start the database (so that the user can work) and copy the backed up information to tape (copying at the same time, the database can also work). The files that must be copied in a cold backup include:

1. all data files

2. all control files

3. all on-line REDOLOG files

4. the Init.ora file (optional)

It is worth noting that a cold backup must be performed with the database closed, when the database is open. When the database is open, performing a database file system backup is not effective.

The following is a complete example of a cold backup.

(1) Shut down the database




(2) Back up all the time files, redo log files, control files, and initialization parameter files with the copy command


(3) Restart the Oracle Database


Three, hot backup

1. Data files a tablespace a tablespace a tablespace backup.

(1) set the tablespace to backup state

(2) backup tablespace datafiles

(3) revert the tablespace to normal state

2. Backup archive log file

(1) temporarily stop the archive process

(2) log down those files in the target directory

(3 ) Restart the archive process

(4) Back up the archived redolog file

3. Back up the control file with the command

The advantages of a hot backup are:

1. Backup can be done at the tablespace or database file level, and backups are short.

2. The database is still available during backup.

3. Recovery in seconds (to a point in time) is possible.

4. Recovery can be done for almost any database entity

5. Recovery is fast, and in most cases loves to recover while the database is still working.

Shortcomings of hot backups:

1. Cannot go wrong, otherwise the consequences are unimaginable.

2. If the hot backup is not successful, the results can not be used for point-in-time recovery.

3. Because it is difficult to maintain, it requires special care and attention, and you are not allowed to stop halfway through the operation.

On the Oracle database backup method explained here for you, in the future, you need to carry out database backup work can refer to the above explanation, from the above any one of the above, you can complete the backup of the Oracle database, I hope that the content involved in the above can help you.

How to backup and restore oracle database

There are three standard modes of Oracle database backup and recovery, which are broadly categorized into two main types, backup and recovery (physical) and import and export (logical). Physical backups can be further divided into non-archive mode (Nonarchivelog-style) and archive mode (Archivelog-style) according to the working mode of the database. Usually, we call the non-archive mode a cold backup and the archive mode a hot backup accordingly.

A cold backup is a copy of the datafiles, control files, and redo log files while the database is shut down. The advantage of cold backup is that it is simple, fast, and secure; the disadvantage is that it requires downtime for maintenance and affects business continuity.

A hot backup is a copy of the data files when the database is open and in archive mode. The advantage of hot backup is that it does not require downtime for maintenance and does not affect business continuity. The disadvantage is that it is more complex, time-consuming, and resource-intensive.

Import and export refers to the use of EXP/IMP or data pump technology to export objects or data in the database to a binary file, and you can import this file into another database. The advantages of import and export are flexibility, convenience, and portability, and the disadvantages are that consistency cannot be guaranteed, efficiency is low, and system objects cannot be recovered.

How to Do Oraclel Database Data Backup

EXP and IMP are a logical backup tool provided by Oracle. A logical backup creates a logical copy of the database objects and stores them in a binary dump file. This logical backup needs to be used in the case of database startup, the essence of its export is to read a database record set (which can even include a data dictionary) and write this record set to a file, the export of these records has nothing to do with its physical location, the essence of the import is to read the dump file and the implementation of the commands therein. This backup method is through Oracle’s utilities export and import to implement, export is the database data export, import is to export the data out of the import database. Through this tool can be derived from a variety of functions, such as the entire database backup, table structure reconstruction, data transfer, user changes and so on.

You can also use professional disaster recovery software to backup ORACLE data. Real-time data backup software is now a lot of CDP disaster recovery backup solution (backup software) in the RPO and RTO two indicators have obvious advantages, you can realize real-time data backup, to protect the continuity of the business system. There are two types of disaster recovery programs: data-level and application-level.