Saturday, May 24, 2025

How to take incremental backup of oracle database ?

 

RMAN>  run {

2>  allocate channel "ch1" device type disk format '/u01/app/oracle/%U';

3> backup as backupset tag 'BASE01' incremental level 0 database;

4> }


released channel: ORA_DISK_1

allocated channel: ch1

channel ch1: SID=281 device type=DISK


Starting backup at 24-MAY-25

channel ch1: starting incremental level 0 datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/DB1/system01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/DB1/sysaux01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/DB1/undotbs01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/DB1/users01.dbf

channel ch1: starting piece 1 at 24-MAY-25

channel ch1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/0l3q8raq_1_1 tag=BASE01 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:25

channel ch1: starting incremental level 0 datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00010 name=/u01/app/oracle/oradata/DB1/pdb/sysaux01.dbf

input datafile file number=00009 name=/u01/app/oracle/oradata/DB1/pdb/system01.dbf

input datafile file number=00011 name=/u01/app/oracle/oradata/DB1/pdb/undotbs01.dbf

input datafile file number=00012 name=/u01/app/oracle/oradata/DB1/pdb/users01.dbf

channel ch1: starting piece 1 at 24-MAY-25

channel ch1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/0m3q8rbj_1_1 tag=BASE01 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:15

channel ch1: starting incremental level 0 datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00017 name=/u01/app/oracle/oradata/demo1/sysaux01.dbf

input datafile file number=00016 name=/u01/app/oracle/oradata/demo1/system01.dbf

input datafile file number=00018 name=/u01/app/oracle/oradata/demo1/undotbs01.dbf

channel ch1: starting piece 1 at 24-MAY-25

channel ch1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/0n3q8rc2_1_1 tag=BASE01 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:07

channel ch1: starting incremental level 0 datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/DB1/pdbseed/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/DB1/pdbseed/system01.dbf

input datafile file number=00008 name=/u01/app/oracle/oradata/DB1/pdbseed/undotbs01.dbf

channel ch1: starting piece 1 at 24-MAY-25

channel ch1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/0o3q8rca_1_1 tag=BASE01 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:15

Finished backup at 24-MAY-25


Starting Control File and SPFILE Autobackup at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/autobackup/2025_05_24/o1_mf_s_1201958297_n33krv6v_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 24-MAY-25

released channel: ch1


RMAN>




===============


RMAN>


RMAN> run {

2> allocate channel "ch1" device type disk format '/u01/app/oracle/%U';

3> backup tag 'incrementallv1' incremental level 1 database ;

4> }


allocated channel: ch1

channel ch1: SID=281 device type=DISK


Starting backup at 24-MAY-25

channel ch1: starting incremental level 1 datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/DB1/system01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/DB1/sysaux01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/DB1/undotbs01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/DB1/users01.dbf

channel ch1: starting piece 1 at 24-MAY-25

channel ch1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/0q3q8rhm_1_1 tag=INCREMENTALLV1 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:03

channel ch1: starting incremental level 1 datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00010 name=/u01/app/oracle/oradata/DB1/pdb/sysaux01.dbf

skipping datafile 00010 because it has not changed

input datafile file number=00009 name=/u01/app/oracle/oradata/DB1/pdb/system01.dbf

skipping datafile 00009 because it has not changed

input datafile file number=00011 name=/u01/app/oracle/oradata/DB1/pdb/undotbs01.dbf

skipping datafile 00011 because it has not changed

input datafile file number=00012 name=/u01/app/oracle/oradata/DB1/pdb/users01.dbf

skipping datafile 00012 because it has not changed

channel ch1: backup cancelled because all files were skipped

channel ch1: starting incremental level 1 datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00017 name=/u01/app/oracle/oradata/demo1/sysaux01.dbf

input datafile file number=00016 name=/u01/app/oracle/oradata/demo1/system01.dbf

input datafile file number=00018 name=/u01/app/oracle/oradata/demo1/undotbs01.dbf

channel ch1: starting piece 1 at 24-MAY-25

channel ch1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/0s3q8rhq_1_1 tag=INCREMENTALLV1 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:01

channel ch1: starting incremental level 1 datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/DB1/pdbseed/sysaux01.dbf

skipping datafile 00006 because it has not changed

input datafile file number=00005 name=/u01/app/oracle/oradata/DB1/pdbseed/system01.dbf

skipping datafile 00005 because it has not changed

input datafile file number=00008 name=/u01/app/oracle/oradata/DB1/pdbseed/undotbs01.dbf

skipping datafile 00008 because it has not changed

channel ch1: backup cancelled because all files were skipped

Finished backup at 24-MAY-25


Starting Control File and SPFILE Autobackup at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/autobackup/2025_05_24/o1_mf_s_1201958459_n33kxxp9_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 24-MAY-25

released channel: ch1


RMAN>

No comments:

Post a Comment

About the Author : Anurag Pandey | Database cloud Architect | Oracle | SQL Server | PostgreSQL | AI and Data Platform Enthusiast

Anurag Pandey is a Database Architect with expertise in Oracle, PostgreSQL, SQL Server, Linux, and enterprise database platforms and specializes in database architecture, performance tuning, high availability, disaster recovery, cloud modernization, and operational excellence. With extensive experience in enterprise-scale environments, Anurag is passionate about leveraging AI, automation, and modern data platforms to improve reliability, scalability, and business outcomes. He actively contributes to technical communities through knowledge sharing, architecture guidance, and thought leadership in database and data engineering domains.

Follow more articles at

Visit Blog

Oracle 19c to PostgreSQL 15 Migration: Step-by-Step Production Guide (Ora2Pg + DMS)

Production-oriented migration approach for a complex Oracle 19c to PostgreSQL 15 workload , covering assessment, schema and code conversion,...