Create Consistent Database Backups (Offline, Closed, Cold, Consistent)
User-Managed: (OS command) offline-whole-full
shutdown immediate;
copy controlfiles
copy online redo log files (optional)
copy datafiles
CREATE PFILE 'file_name' FROM SPFILE;
startup;
Server-Managed: (RMAN command) offline-whole-full
shutdown immediate;
startup mount;
backup database;
alter database open;
Back Up Your Database Without Shutting It Down (Online, Open, Hot, Inconsistent)
User-Managed: online-whole-full
ALTER DATABASE BACKUP CONTROLFILE to 'file_name'; (binary copy)
ALTER DATABASE BACKUP CONTROLFILE to trace as 'file_name'; (sql script to generate control file)
ALTER TABLESPACE tablespace_name begin backup;
Copy tablespace_name's datafiles
ALTER TABLESPACE tablespace_name end backup;
CREATE PFILE 'file_name' FROM SPFILE;
Copy archived redo log files
Server-Managed: online/offline-whole-full
backup database;
backup archivelog all;
backup tablespace sysaux; online/offline-partial-full
Create Incremental Backups
Server-Managed: online/offline-whole/partial-incremental
online (open mode), offline (mount mode)
backup as backupset incremental level 0 database; online/offline-whole-incremental
backup as backupset incremental level 1 database;
backup as backupset cumulative database;
backup incremental level 1 tablespace system; online/offline-partial-incremental
Automate Database Backups
Enterprise Manager can schedule backups using server-managed, RMAN. (online/offline-whole/partial-full/incremental)
Manage Backups, View Backup Reports, and Monitor the Flash Recovery Area
RMAN's backup repository are stored in controlfiles.
list backup of database;
list backup of archivelog all;
list copy of tablespace tablespace_name;
report need backup;
report obsolete;
delete obsolete;
catalog datafilecopy 'dbfile_name';
DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE
V$RECOVERY_FILE_DEST
V$FLASH_RECOVERY_AREA_USAGE
Archivelog Mode + RMAN (online/offline-whole/partial-full/incremental)
Noarchivelog Mode
User-Managed (OS command): offline-whole-full
Server-Managed (RMAN command): offline-whole-incremental
User-Managed must be full, cannot have incremental.
incremental must be Server-Managed, full can be Server-Managed.
Summary: (RMAN command examples, same for online/offline)
Archivelog or NoArchivelog Mode
offline-whole-full (User Managed, RMAN (mount mode))
offline-whole-incremental (RMAN (mount mode))
------------------------------------------
Archivelog Mode
offline-partial-full (User Managed, RMAN (mount mode)):
offline-partial-incremental (RMAN (mount mode))
online-whole-full (User Managed (backup mode), RMAN): backup database;
online-whole-incremental (RMAN): backup incremental level 1 database;
online-partial-full (User Managed (backup mode), RMAN) backup tablespace tablespace_name;
online-partial-incremental (RMAN): backup incremental level 1 tablespace tablespace_name;
-----------------------------------------------------------------------------------------------
Summary: (OS command examples, same for online/offline)
Archivelog or NoArchivelog Mode
offline-whole-full (User Managed, RMAN (mount mode)): copy all controlfiles, online redo log files, datafiles
offline-whole-incremental (RMAN (mount mode))
------------------------------------------
Archivelog Mode
offline-partial-full (User Managed, RMAN (mount mode)): copy some controlfiles, online redo log files, datafiles
offline-partial-incremental (RMAN (mount mode))
online-whole-full (User Managed (backup mode), RMAN): backup database;
online-whole-incremental (RMAN): backup incremental level 1 database;
online-partial-full (User Managed (backup mode), RMAN) backup tablespace tablespace_name;
online-partial-incremental (RMAN): backup incremental level 1 tablespace tablespace_name;
Monday, July 20, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment