If a database runs in NOARCHIVELOG mode, then the only valid database backup is a consistent backup . For the backup to be consistent, the database must be mounted after a consistent shutdown. Recovery is not specifically required after restoring the backup, but you would lose any transactions made after the backup. You can recover with archived logs from a consistent backup to minimize data loss.
To make a consistent database backup:
- Start RMAN and connect to a target database as described in " Starting RMAN and Connecting to a Database ".
- Shut down the database consistently and then mount it. For example, enter the following commands to guarantee that the database is in a consistent state for a backup: RMAN> SHUTDOWN IMMEDIATE; RMAN> STARTUP FORCE DBA; RMAN> SHUTDOWN IMMEDIATE; RMAN> STARTUP MOUNT;
- Run the BACKUP DATABASE command. For example, enter the following command at the RMAN prompt to back up the database to the default backup device: RMAN> BACKUP DATABASE; The following variation of the command creates image copy backups of all data files in the database: RMAN> BACKUP AS COPY DATABASE;
- Open the database and resume normal operations. The following command opens the database: RMAN> ALTER DATABASE OPEN;
|
Option |
Description |
Example |
|
FORMAT |
Specifies a location and name for backup pieces and copies. You must use substitution variables to generate unique file names. The most common substitution variable is %U , which generates a unique name. Others include %d for the DB_NAME, %t for the backup set time stamp, %s for the backup set number, and %p for the backup piece number. |
BACKUP FORMAT 'AL_%d/%t/%s/%p' ARCHIVELOG LIKE '%arc_dest%'; |
|
TAG |
Specifies a user-defined string as a label for the backup. If you do not specify a tag , then RMAN assigns a default tag with the date and time. Tags are always stored in the RMAN repository in uppercase. |
BACKUP TAG 'weekly_full_db_bkup' DATABASE MAXSETSIZE 10M; |
编辑推荐:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
