понедельник, 29 июля 2013 г.

Oracle Database. Cold backup example. Пример команд для выполнения холодного бекапа

Oracle Database cold backup example. Пример команд для выполнения холодного бекапа БД Oracle 11gR2

Холодный бекап можно выполнить с помощью утилиты RMAN.
Пример последовательности команд (жирным выделены сами команды):

RMAN> shutdown immediate

database closed
database dismounted
Oracle instance shut down

RMAN> startup mount;

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area    2505338880 bytes

Fixed Size                     2257792 bytes
Variable Size                620760192 bytes
Database Buffers            1862270976 bytes
Redo Buffers                  20049920 bytes

RMAN> backup database format 'D:\Oracle\Backup\idmdbbackup_%d_%U.bus';

Starting backup at 26-JUL-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=208 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=D:\ORACLE\ORADATA\IDMDB\SYSTEM01.DBF
input datafile file number=00002 name=D:\ORACLE\ORADATA\IDMDB\SYSAUX01.DBF
input datafile file number=00007 name=D:\ORACLE\ORADATA\IDMDB\PROD_OIMLOB.DBF
input datafile file number=00009 name=D:\ORACLE\ORADATA\IDMDB\PROD_IASSDPM.DBF
input datafile file number=00006 name=D:\ORACLE\ORADATA\IDMDB\PROD_SOAINFRA.DBF
input datafile file number=00008 name=D:\ORACLE\ORADATA\IDMDB\PROD_OIM.DBF
input datafile file number=00005 name=D:\ORACLE\ORADATA\IDMDB\PROD_MDS.DBF
input datafile file number=00003 name=D:\ORACLE\ORADATA\IDMDB\UNDOTBS01.DBF
input datafile file number=00004 name=D:\ORACLE\ORADATA\IDMDB\USERS01.DBF
input datafile file number=00010 name=D:\ORACLE\ORADATA\IDMDB\OIM_RECON_ARCH.DBF
channel ORA_DISK_1: starting piece 1 at 26-JUL-13
channel ORA_DISK_1: finished piece 1 at 26-JUL-13
piece handle=D:\ORACLE\BACKUP\IDMDBBACKUP_IDMDB_0BOFN7G5_1_1.BUS tag=TAG20130726T124557 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 26-JUL-13
channel ORA_DISK_1: finished piece 1 at 26-JUL-13
piece handle=D:\ORACLE\BACKUP\IDMDBBACKUP_IDMDB_0COFN7GV_1_1.BUS tag=TAG20130726T124557 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 26-JUL-13

%d - указывает в имени бекапа название БД
%U - генерирует уникальное имя бекапа

Полезная литература:


1. Oracle® Database Backup and Recovery Reference 11g Release 2 (11.2)
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#i78895
Раздел "BACKUP"
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsubcl010.htm#i82206
Раздел "formatSpec"

Комментариев нет:

Отправить комментарий