Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to back up the entire library and archive logs by RMAN

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to backup the entire library and archive logs, the article is very detailed, has a certain reference value, interested friends must read!

Found a point: as long as the CONTROLFILE AUTOBACKUP is turned on, even if only one archive log is backed up, the last step will definitely back up the control file and spfile(if it is pfile startup, the spfile will not be backed up)

The best way to backup the entire database

CONFIGURE CONTROLFILE AUTOBACKUP ON;

backup database format '/db/backup/data%U.bak' plus archivelog format '/db/backup/arch%U.bak' delete input;

Backup and recovery methods for archived logs

Rman>backup archivelog all;--Backup all archive logs

Rman>backup archivelog sequence 580 --Backup 580 this archive log

Rman>backup archivelog sequence between 580 and 584;--backup archivelog sequence from 580 to 584

Rman>backup archivelog from sequence 580;--Backup all archive logs starting at 580

Rman>backup archivelog from sequence 580 until sequence 584;--backup archivelog from sequence 580 to sequence 584

Rman>restore archivelog all;

Rman>restore archivelog sequence 580;

Rman>restore archivelog sequence between 580 and 584;

Rman>restore archivelog from sequence 580;

Rman> restore archivelog from sequence 580 until sequence 584;

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

backup database plus archivelog format '/db/backup/data_arch%U.bak' delete input;

current log archived+ backup archive log + delete archive log

2. Backup data files

3. Backup control files and spfiles (if pfile is started, spfiles will not be backed up)

current log archived+ backup archive log + delete archive log

backup database archivelog all format '/db/backup/data_arch%U.bak' delete input;

backup database include current controlfile archivelog all format '/db/backup/data_arch%U.bak' delete input;

1. Backup data files

2. Backup archive log + delete archive log (if any, if archive log is deleted but no archive log is generated during backup, this step will not occur)

3. Backup control file and spfile(if pfile is started, spfile will not be backed up)

backup database current controlfile archivelog all format '/db/backup/data_arch%U.bak' delete input;

1. Backup data files

2. Backup archive log + delete archive log (if any, if archive log is deleted but no archive log is generated during backup, this step will not occur)

3. Backup control file and spfile(if pfile is started, spfile will not be backed up)

4. Backup control file

backup database current controlfile plus archivelog format '/db/backup/data_arch%U.bak' delete input;

current log archived+ backup archive log + delete archive log

2. Backup data files

3. Backup control files and spfiles (if pfile is started, spfiles will not be backed up)

4. Backup control file

current log archived+ backup archive log + delete archive log

CONFIGURE CONTROLFILE AUTOBACKUP ON;

backup database plus archivelog format '/db/backup/data_arch%U.bak' delete input;

current log archived+ backup archive log + delete archive log

2. Backup data files

current log archived+ backup archive log + delete archive log

4. Backup control files and spfiles (if pfile is started, spfiles will not be backed up)

backup database archivelog all format '/db/backup/data_arch%U.bak' delete input;

1. Backup data files

2. Backup archive log + delete archive log (if any, if archive log is deleted but no archive log is generated during backup, this step will not occur)

3. Backup control file and spfile(if pfile is started, spfile will not be backed up)

backup database include current controlfile archivelog all format '/db/backup/data_arch%U.bak' delete input;

backup database current controlfile archivelog all format '/db/backup/data_arch%U.bak' delete input;

1. Backup data files

2. Backup archive log + delete archive log (if any, if archive log is deleted but no archive log is generated during backup, this step will not occur)

3. Backup control file

4. Backup control file and spfile(if pfile is started, spfile will not be backed up)

backup database current controlfile plus archivelog format '/db/backup/data_arch%U.bak' delete input;

current log archived+ backup archive log + delete archive log

2. Backup data files

3. Backup control file

current log archived+ backup archive log + delete archive log

5. Backup control files and spfiles (if pfile is started, spfiles will not be backed up)

The above is all the content of this article,"How to backup the whole database and archive logs by RMAN", thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report