Atikh's DBA blog
  • Home
  • Oracle
  • MySQL
  • MongoDB
  • PostgreSQL
  • Snowflake
  • About Me
  • Contact Us

RMAN Disk backup and List or Report RMAN Backup

 Atikh Shaikh     oracle, RMAN     No comments   

In this post we are going to discuss RMAN disk backup and how to list the same.
consider database name is :ASGARD

We will see example how to take RMAN full backup of database with archive log mode on.

Check if ARCHIVELOG mode is on

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/ASGARD/arch
Oldest online log sequence     404
Next log sequence to archive   406
Current log sequence           406

We need to create command file(rcv) and shell script to call command file

First create commandfile (this will take backup of datafiles, controlfile and archivelogs as well)

vi rman_disk_bkp_ASGARD_20Nov2018.rcv

run
{
allocate channel ch1 type disk format '/u01/rman_backup/full_rman_disk1_ASGARD_%U.bck' maxpiecesize 10240M;
allocate channel ch2 type disk format '/u01/rman_backup/full_rman_disk2_ASGARD_%U.bck' maxpiecesize 10240M;
backup incremental level 0 database tag = full_rman_disk;
sql 'alter system archive log current';
release channel ch1;
release channel ch2;
allocate channel ch3 type disk format '/u01/rman_backup/arch_backup_disk3_ASGARD_%U.bck' maxpiecesize 10240M;
backup archivelog from logseq 404;
backup current controlfile format '/u01/rman_backup/ctrl_backup_disk4_ASGARD_%U.bck';
release channel ch3;

}

shell script to call above command file

vi rman_disk_bkp_ASGARD_20Nov2018.sh 

rman target / cmdfile=rman_disk_bkp_ASGARD_20Nov2018.rcv  log=rman_disk_bkp_ASGARD_20Nov2018.log


Check if any syntactical error


$ rman checksyntax@rman_disk_bkp_ASGARD_20Nov2018.rcv

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Nov 20 02:25:58 2018


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


RMAN> run

2> {
3> allocate channel ch1 type disk format '/u01/rman_backup/full_rman_disk1_ASGARD_%U.bck' maxpiecesize 10240M;
4> allocate channel ch2 type disk format '/u01/rman_backup/full_rman_disk2_ASGARD_%U.bck' maxpiecesize 10240M;
5> backup incremental level 0 database tag = full_rman_disk;
6> sql 'alter system archive log current';
7> release channel ch1;
8> release channel ch2;
9> allocate channel ch3 type disk format '/u01/rman_backup/arch_backup_disk3_ASGARD_%U.bck' maxpiecesize 10240M;
10> backup archivelog from logseq 12404;
11> backup current controlfile format '/u01/rman_backup/ctrl_backup_disk4_ASGARD_%U.bck';
12> release channel ch3;
13> }
14>
The cmdfile has no syntax errors

Recovery Manager complete.

$

Now we need just need to execute the sh file.


$sh rman_disk_bkp_ASGARD_20Nov2018.sh  &

once this backup is completed, we can check the same in RMAN client 



$ rman target / nocatalog

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Nov 20 02:35:57 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ASGARD (DBID=2227813556)
using target database control file instead of recovery catalog

RMAN> LIST BACKUPSET TAG 'full_open_backup_disk';


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19089   Incr 0  7.70M      DISK        00:00:02     20-NOV-18
        BP Key: 19089   Status: AVAILABLE  Compressed: NO  Tag: FULL_OPEN_BACKUP_DISK
        Piece Name: /u01/rman_backup/rman_full_open_backup2_ASGARD_992656989_19415_1_untilfit_1_1.bck
  List of Datafiles in backup set 19089
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  5    0  Incr 14718266652218 20-NOV-18 /u02/ASGARD/data/undotbs1_02.dbf
  7    0  Incr 14718266652218 20-NOV-18 /u02/ASGARD/data/tools_01.dbf
  9    0  Incr 14718266652218 20-NOV-18 /u02/ASGARD/data/perfstats_i1_01.dbf
  10   0  Incr 14718266652218 20-NOV-18 /u02/ASGARD/data/sys_audit_d1_01.dbf
  11   0  Incr 14718266652218 20-NOV-18 /u02/ASGARD/data/db_qts01.dbf
  12   0  Incr 14718266652218 20-NOV-18 /u02/ASGARD/data/db_qts02.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19090   Incr 0  46.39M     DISK        00:00:02     20-NOV-18
        BP Key: 19090   Status: AVAILABLE  Compressed: NO  Tag: FULL_OPEN_BACKUP_DISK
        Piece Name: /u01/rman_backup/rman_full_open_backup2_ASGARD_992656993_19416_1_uotilfj1_1_1.bck
  Control File Included: Ckp SCN: 14718266652220   Ckp time: 20-NOV-18

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19091   Incr 0  80.00K     DISK        00:00:00     20-NOV-18
        BP Key: 19091   Status: AVAILABLE  Compressed: NO  Tag: FULL_OPEN_BACKUP_DISK
        Piece Name: /u01/rman_backup/rman_full_open_backup2_ASGARD_992656997_19417_1_uptilfj5_1_1.bck
  SPFILE Included: Modification time: 11-JUL-18
  SPFILE db_unique_name: ASGARD

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19092   Incr 0  7.86G      DISK        00:01:54     20-NOV-18
        BP Key: 19092   Status: AVAILABLE  Compressed: NO  Tag: FULL_OPEN_BACKUP_DISK
        Piece Name: /u01/rman_backup/rman_full_open_backup1_ASGARD_992656989_19414_1_umtilfit_1_1.bck
  List of Datafiles in backup set 19092
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    0  Incr 14718266652216 20-NOV-18 /u01/ASGARD/data/system_01.dbf
  2    0  Incr 14718266652216 20-NOV-18 /u02/ASGARD/data/sysaux_01.dbf
  3    0  Incr 14718266652216 20-NOV-18 /u03/ASGARD/data/sysaux_02.dbf
  4    0  Incr 14718266652216 20-NOV-18 /u01/ASGARD/data/undotbs1_01.dbf
  6    0  Incr 14718266652216 20-NOV-18 /u01/ASGARD/data/users_01.dbf
  8    0  Incr 14718266652216 20-NOV-18 /u03/ASGARD/data/perfstats_d1_01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19095   Incr 0  7.70M      DISK        00:00:00     20-NOV-18
        BP Key: 19095   Status: AVAILABLE  Compressed: NO  Tag: FULL_OPEN_BACKUP_DISK
        Piece Name: /u01/rman_backup/rman_full_open_backup2_992657412_19421_1_uttilg04_1_1.bck
  List of Datafiles in backup set 19095
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  5    0  Incr 14718266652461 20-NOV-18 /u02/ASGARD/data/undotbs1_02.dbf
  7    0  Incr 14718266652461 20-NOV-18 /u02/ASGARD/data/tools_01.dbf
  9    0  Incr 14718266652461 20-NOV-18 /u04/ASGARD/data/perfstats_i1_01.dbf
  10   0  Incr 14718266652461 20-NOV-18 /u01/ASGARD/data/sys_audit_d1_01.dbf
  11   0  Incr 14718266652461 20-NOV-18 /u01/ASGARD/data/db_qts01.dbf
  12   0  Incr 14718266652461 20-NOV-18 /u01/ASGARD/data/db_qts02.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19096   Incr 0  46.39M     DISK        00:00:02     20-NOV-18
        BP Key: 19096   Status: AVAILABLE  Compressed: NO  Tag: FULL_OPEN_BACKUP_DISK
        Piece Name: /u01/rman_backup/rman_full_open_backup2_ASGARD_992657413_19422_1_uutilg05_1_1.bck
  Control File Included: Ckp SCN: 14718266652462   Ckp time: 20-NOV-18

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19097   Incr 0  80.00K     DISK        00:00:01     20-NOV-18
        BP Key: 19097   Status: AVAILABLE  Compressed: NO  Tag: FULL_OPEN_BACKUP_DISK
        Piece Name: /u01/rman_backup/rman_full_open_backup2_ASGARD_992657417_19423_1_uvtilg09_1_1.bck
  SPFILE Included: Modification time: 11-JUL-18
  SPFILE db_unique_name: ASGARD

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19098   Incr 0  7.86G      DISK        00:01:14     20-NOV-18
        BP Key: 19098   Status: AVAILABLE  Compressed: NO  Tag: FULL_OPEN_BACKUP_DISK
        Piece Name: /u01/rman_backup/rman_full_open_backup1_ASGARD_992657412_19420_1_ustilg04_1_1.bck
  List of Datafiles in backup set 19098
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    0  Incr 14718266652459 20-NOV-18 /u01/ASGARD/data/system_01.dbf
  2    0  Incr 14718266652459 20-NOV-18 /u02/ASGARD/data/sysaux_01.dbf
  3    0  Incr 14718266652459 20-NOV-18 /u03/ASGARD/data/sysaux_02.dbf
  4    0  Incr 14718266652459 20-NOV-18 /u01/ASGARD/data/undotbs1_01.dbf
  6    0  Incr 14718266652459 20-NOV-18 /u01/ASGARD/data/users_01.dbf
  8    0  Incr 14718266652459 20-NOV-18 /u03/ASGARD/data/perfstats_d1_01.dbf

RMAN>




Comment below if you need any additional info.
also check rman-backup-single-datafile-and-list




  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Author

Atikh Shaikh
View my complete profile

Categories

  • MongoDB (18)
  • Oracle 12c (30)
  • Oracle12cR2 New Feature (3)
  • PostgreSQL (20)
  • RMAN (10)
  • Snowflake (8)
  • mysql (23)
  • oracle (74)

Blog Archive

  • ▼  2018 (38)
    • ▼  November (25)
      • Introduction On MySQL
      • SQL Modes in MySQL
      • MySQL Version explained
      • MySQL Storage Engines (Part 1)
      • MySQL Storage Engines (Part 2)
      • Login to MySQL Database on Linux
      • Error Code: 1419. You do not have the SUPER privil...
      • Create MySQL database on Linux
      • Create New User in MySQL Database
      • MySQL Default database | MySQL System Database
      • Oracle ASM Basic Commands
      • Oracle Database Schema Refresh
      • Create User in Oracle Database Pre-12c and 12c
      • RMAN Disk backup and List or Report RMAN Backup
      • RMAN Backup of Single Datafile and List Backup
      • Difference Between User, Service account and Schem...
      • Create MySQL Database Backup | mysqldump mysqlbackup
      • Switching between ARCHIVELOG Mode and NOARCHIVELOG...
      • Introduction to MongoDB
      • Introduction to PostgreSQL
      • Installation of PostgreSQL 9.6 on Windows
      • Installation of MongoDB on Windows
      • Oracle DBA Scripts
      • Databases, Collections and Documents in MongoDB
      • CRUD (Create, Read, Update, Delete) Operations in ...
    • ►  December (13)
  • ►  2019 (33)
    • ►  January (15)
    • ►  February (6)
    • ►  March (2)
    • ►  April (5)
    • ►  May (5)
  • ►  2020 (5)
    • ►  April (1)
    • ►  May (2)
    • ►  July (2)
  • ►  2021 (8)
    • ►  June (3)
    • ►  July (3)
    • ►  August (1)
    • ►  December (1)
  • ►  2022 (33)
    • ►  May (3)
    • ►  June (10)
    • ►  July (3)
    • ►  August (4)
    • ►  September (8)
    • ►  October (3)
    • ►  November (2)
  • ►  2023 (14)
    • ►  February (1)
    • ►  April (5)
    • ►  May (2)
    • ►  June (1)
    • ►  September (1)
    • ►  October (1)
    • ►  December (3)
  • ►  2024 (5)
    • ►  January (2)
    • ►  March (3)
  • ►  2025 (6)
    • ►  March (1)
    • ►  April (3)
    • ►  May (2)

Popular Posts

  • ORA-29283: invalid file operation: unexpected "LFI" error (1509)[29437]
    I was trying to export the schema in my windows PC, it got stuck with below error    C:\Users\shaik\Videos\technodba exp>expdp userid...
  • PostgreSQL : How to get data directory location for PostgreSQL instance
    Sometimes, you start working on a PostgreSQL instance but forget about the data directory, here we will discuss different methods to know th...
  • Oracle 23ai : Use of NOVALIDATE Constraints in IMPDP
    While performing impdp operations in the Oracle database, Oracle performs validation checks for every constraint on the imported table, that...
  • ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
    In previous articles, we have learned about user creation and grants  in MySQL in detail, but there are a few privileges called global priv...
  • Oracle Dataguard Broker Configuration (DGMGRL)
    Data Guard Broker is a command-line interface that makes managing primary and standby databases easy. DBA can use a single command to switch...

Labels

oracle Oracle 12c mysql PostgreSQL MongoDB oracle 19c Oracle23c oracle19c Orale PDB-CDB oracle12c python AWS Oracle ASM Virtualbox pluggable database storage engine

Pages

  • Disclaimer
  • Privacy Policy

Follow TechnoDBA

Copyright © Atikh's DBA blog | Powered by Blogger