rman 증분 백업 설정.
- bat 파일
set oracle_sid=dev
rman target sys/admin@dev @D:\Oracle_Backup\Incremental_Backup\Dev\dev_rman_backup.sql
- sql 파일
run
{
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'D:\Oracle_Backup\Incremental_Backup\DEV\%d_%U_FULL_database_%T.bk';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\Oracle_Backup\Incremental_Backup\DEV\db_ctl_%F';
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
BACKUP AS BACKUPSET database PLUS ARCHIVELOG;
CROSSCHECK BACKUP;
DELETE NOPROMPT BACKUPSET COMPLETED BEFORE 'SYSDATE-7';
DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-8';
}
---------------------------------------------------------------------------------------------------------------------------------------------------------
- 오류
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 09/05/2023 12:44:08
RMAN-06149: cannot BACKUP DATABASE in NOARCHIVELOG mode
아카이브 모드 전환.
Oracle Archive Mode 활성/비활성 관리하기 (zinnunkebi.com)
-- 파일 삭제 bat 파일 (1일 기준 삭제)
@echo off
forfiles /P D:\Oracle_Backup\Incremental_Backup /S /M *.BK /D -1 /C "cmd /c del @file"