This discussion is archived
9 Replies Latest reply: May 28, 2013 3:30 AM by 987709 RSS

How to take ASM database/Instance backup?

987709 Newbie
Currently Being Moderated
Hi,

I am new with ASM. we want to take ASM databse/instance backup.

can anyone have idea for ASM backup?

1. What components need to be backed up like ASM database/Instance/ ASM any files?


Please do needful.

Thank you,
Nitin
  • 1. Re: How to take ASM database/Instance backup?
    DK2010 Guru
    Currently Being Moderated
    Hi,

    Have you seen this article.

    http://www.oracle.com/technetwork/articles/sql/11g-asm-083478.html

    HTH
  • 2. Re: How to take ASM database/Instance backup?
    FreddieEssex Pro
    Currently Being Moderated
    You don't need to backup the ASM instance. There are no datafiles as part of the ASM instance.

    You can backup the metadata for the disk groups using md_backup.

    http://docs.oracle.com/cd/B28359_01/server.111/b31107/asm_util.htm#BJEGIGDD
  • 3. Re: How to take ASM database/Instance backup?
    Dude! Guru
    Currently Being Moderated
    Oracle ASM is part of Grid Infrastructure and resides in its own ORACLE_HOME directory. Backup of the ASM software is the same as any other Oracle installation. The backup of any database using the ASM instance can be done using RMAN, which is the standard tool to backup all Oracle Databases. To access or copy individual files from the OS command line you can use the ASMCMD command. However, you cannot use TAR or any other backup software to access the data on ASM disks.
  • 4. Re: How to take ASM database/Instance backup?
    987709 Newbie
    Currently Being Moderated
    Hi,

    What type of backup will be taken by md_backup command?

    will it take all files/directory/DG of ASM?

    I still confused what type of metadata will be backed up?

    Please suggest.

    Thank you,
    Nitin
  • 5. Re: How to take ASM database/Instance backup?
    Levi-Pereira Guru
    Currently Being Moderated
    984706 wrote:
    Hi,

    What type of backup will be taken by md_backup command?

    will it take all files/directory/DG of ASM?

    I still confused what type of metadata will be backed up?
    There is two different things:

    1: Backup of Database stored on ASM
    2: Backup of ASM configuration

    Backup of Database stored on ASM should be done using RMAN.
    When you are not using ASM, how do you take a backup of Oracle Database using RMAN?
    The same way you will take backup of database on stored on ASM. Using RMAN just run "Backup Database Plus Archivelog....".

    About Backup ASM Configuration:
    You can backup structure (metadata) of ASMDISK Group to a File, that can be used only to recreate ASMDISK GROUP and it's configuration (i.e No Data). To restore data you will need use RMAN as you would on normal filesystem.

    How do I backup my ASM instance?
    ASM has no files to backup, as its does not contain controlfile,redo logs etc.


    ASM is a Filesystem that has it's particular concept.
    Oracle Database are Files stored on filesystem supported by Oracle ( such as ASM, EXT3 and so on)

    You must learn about two concepts that are different from one to another.
  • 6. Re: How to take ASM database/Instance backup?
    AshishShukla Newbie
    Currently Being Moderated
    Hello Nitin,

    First of all you need to understand that RDBMS & ASM instance both is different but yes both are running on the same machine.

    ASM Includes basically two things: (1) ASM instance and (2) ASM storage.

    1) ASM instance
    ------------------------

    It is just an instance so that we need not to take any backup but yes if you want to preserve the configuration file of ASM instance then just do like this:

    [grid@host01 ~]$ . oraenv
    ORACLE_SID = [+ASM1] ? +ASM1
    The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/grid

    SQL> create pfile='/home/grid/init+ASM1.ora' from spfile;

    File created.


    2) ASM STORAGE
    -------------------------

    - ASM storage basically includes ASM diskgroups which is again collection of multiple disks.

    - Whenever we do create ASM diskgroup that diskgroup contains again three things:

    a) ASM disks
    b) Templates and Metadata
    c) ASM files (basically datafile or any files of database)

    - We need to take backup of two things out of three things of ASM diskgroup :

    1) ASM files- using RMAN because these are database files.
    2) ASM diskgroup Templates & Metadata- using MD_BACKUP command from ASMCMD.

    Now, MD_BACKUP will create a backup file as your specified location and that file will includes all the templates and metadata of that diskgroup. Benefit of taking diskgroup metadata is, if we lost the diskgroup then we need not to worry about the configuration details just use MD_RESTORE command to recreate the diskgroup with the same configuration. But remember it will not restore datafile or any other files which was there on that diskgroup we'll have to use RMAN to restore those missing files.

    See the sample:

    ASMCMD> lsdg

    State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
    MOUNTED EXTERN N 512 4096 1048576 11742 11643 0 11643 0 N ABC/
    MOUNTED  NORMAL   N         512    4096   1048576     15656    10661             1259            4701             0           N    DATA/
    MOUNTED EXTERN N 512 4096 1048576 15656 13874 0 13874 0 N FRA/
    ASMCMD>
    >


    ASMCMD> md_backup /home/grid/data_backup_file -G DATA
    Disk group metadata to be backed up: DATA
    Current alias directory path: cluster01
    Current alias directory path: ORCL
    Current alias directory path: ORCL/PARAMETERFILE
    Current alias directory path: ORCL/DATAFILE
    Current alias directory path: cluster01/OCRFILE
    Current alias directory path: ORCL/CONTROLFILE
    Current alias directory path: ORCL/TEMPFILE
    Current alias directory path: ORCL/ONLINELOG
    Current alias directory path: cluster01/ASMPARAMETERFILE
    ASMCMD>

    *# vim /home/grid/data_backup_file*

    @diskgroup_set = (
    {
    'ATTRINFO' => {
    'TEMPLATE.OCRBACKUP.REDUNDANCY' => '18',
    'TEMPLATE.PARAMETERFILE.MIRROR_REGION' => '0',
    'TEMPLATE.TEMPFILE.REDUNDANCY' => '18',
    'TEMPLATE.TEMPFILE.MIRROR_REGION' => '0',
    'TEMPLATE.PARAMETERFILE.REDUNDANCY' => '18',
    'SECTOR_SIZE' => '512',
    'TEMPLATE.DATAGUARDCONFIG.REDUNDANCY' => '18',
    'ACCESS_CONTROL.UMASK' => '066',
    'TEMPLATE.ASM_STALE.STRIPE' => '0',
    'TEMPLATE.ARCHIVELOG.STRIPE' => '0',
    'TEMPLATE.DATAGUARDCONFIG.PRIMARY_REGION' => '0',
    'TEMPLATE.OCRBACKUP.STRIPE' => '0',
    'TEMPLATE.DATAFILE.STRIPE' => '0',
    'AU_SIZE' => '1048576',
    'TEMPLATE.ASMPARAMETERFILE.STRIPE' => '0',
    'TEMPLATE.CHANGETRACKING.PRIMARY_REGION' => '0',
    'TEMPLATE.CONTROLFILE.REDUNDANCY' => '19',
    'TEMPLATE.FLASHFILE.STRIPE' => '0',
    'TEMPLATE.BACKUPSET.PRIMARY_REGION' => '0',
    'TEMPLATE.ARCHIVELOG.PRIMARY_REGION' => '0',
    'TEMPLATE.CHANGETRACKING.STRIPE' => '0',
    'TEMPLATE.ONLINELOG.PRIMARY_REGION' => '0',
    'TEMPLATE.CHANGETRACKING.REDUNDANCY' => '18',
    'TEMPLATE.BACKUPSET.STRIPE' => '0',
    'TEMPLATE.OCRFILE.MIRROR_REGION' => '0',
    'DISK_REPAIR_TIME' => '3.6h',
    'TEMPLATE.AUTOBACKUP.REDUNDANCY' => '18',
    'TEMPLATE.DUMPSET.REDUNDANCY' => '18',
    'TEMPLATE.FLASHBACK.MIRROR_REGION' => '0',
    'TEMPLATE.DUMPSET.MIRROR_REGION' => '0',
    'TEMPLATE.DUMPSET.PRIMARY_REGION' => '0',
    'TEMPLATE.ASM_STALE.REDUNDANCY' => '19',
    'TEMPLATE.FLASHBACK.PRIMARY_REGION' => '0',
    'TEMPLATE.CONTROLFILE.STRIPE' => '1',
    'TEMPLATE.DATAFILE.REDUNDANCY' => '18',
    'TEMPLATE.XTRANSPORT.REDUNDANCY' => '18',
    'TEMPLATE.AUTOBACKUP.PRIMARY_REGION' => '0',
    'TEMPLATE.CONTROLFILE.MIRROR_REGION' => '0',
    'TEMPLATE.DATAFILE.PRIMARY_REGION' => '0',
    'TEMPLATE.ASMPARAMETERFILE.REDUNDANCY' => '18',
    'TEMPLATE.FLASHFILE.MIRROR_REGION' => '0',
    'TEMPLATE.ASM_STALE.MIRROR_REGION' => '0',
    'TEMPLATE.FLASHBACK.REDUNDANCY' => '18',
    'TEMPLATE.DATAGUARDCONFIG.STRIPE' => '0',
    'CELL.SMART_SCAN_CAPABLE' => 'FALSE',
    'TEMPLATE_VERSION' => '186646528',
    'TEMPLATE.PARAMETERFILE.STRIPE' => '0',
    'TEMPLATE.DATAFILE.MIRROR_REGION' => '0',
    'TEMPLATE.PARAMETERFILE.PRIMARY_REGION' => '0',
    'TEMPLATE.BACKUPSET.MIRROR_REGION' => '0',
    'TEMPLATE.OCRBACKUP.MIRROR_REGION' => '0',
    'TEMPLATE.ONLINELOG.REDUNDANCY' => '18',
    'TEMPLATE.ASMPARAMETERBAKFILE.STRIPE' => '0',
    'ACCESS_CONTROL.ENABLED' => 'FALSE',
    'TEMPLATE.DATAGUARDCONFIG.MIRROR_REGION' => '0',
    'TEMPLATE.TEMPFILE.PRIMARY_REGION' => '0',
    'COMPATIBLE.RDBMS' => '10.1.0.0.0',
    'TEMPLATE.FLASHFILE.PRIMARY_REGION' => '0',
    'TEMPLATE.ONLINELOG.MIRROR_REGION' => '0',
    'TEMPLATE.FLASHFILE.REDUNDANCY' => '18',
    'TEMPLATE.OCRBACKUP.PRIMARY_REGION' => '0',
    'TEMPLATE.OCRFILE.STRIPE' => '0',
    'TEMPLATE.AUTOBACKUP.MIRROR_REGION' => '0',
    'TEMPLATE.ASM_STALE.PRIMARY_REGION' => '0',
    'TEMPLATE.ASMPARAMETERBAKFILE.PRIMARY_REGION' => '0',
    'TEMPLATE.XTRANSPORT.PRIMARY_REGION' => '0',
    'TEMPLATE.DUMPSET.STRIPE' => '0',
    'TEMPLATE.TEMPFILE.STRIPE' => '0',
    'TEMPLATE.OCRFILE.PRIMARY_REGION' => '0',
    'TEMPLATE.ONLINELOG.STRIPE' => '0',
    'TEMPLATE.ARCHIVELOG.REDUNDANCY' => '18',
    'TEMPLATE.OCRFILE.REDUNDANCY' => '18',
    'TEMPLATE.ARCHIVELOG.MIRROR_REGION' => '0',
    'TEMPLATE.ASMPARAMETERFILE.MIRROR_REGION' => '0',
    'TEMPLATE.FLASHBACK.STRIPE' => '0',
    'TEMPLATE.CONTROLFILE.PRIMARY_REGION' => '0',
    'TEMPLATE.XTRANSPORT.MIRROR_REGION' => '0',
    'TEMPLATE.BACKUPSET.REDUNDANCY' => '18',
    'TEMPLATE.ASMPARAMETERBAKFILE.REDUNDANCY' => '18',
    'TEMPLATE.XTRANSPORT.STRIPE' => '0',
    'TEMPLATE.CHANGETRACKING.MIRROR_REGION' => '0',
    'COMPATIBLE.ASM' => '11.2.0.0.0',
    'TEMPLATE.ASMPARAMETERBAKFILE.MIRROR_REGION' => '0',
    'TEMPLATE.ASMPARAMETERFILE.PRIMARY_REGION' => '0',
    'TEMPLATE.AUTOBACKUP.STRIPE' => '0'
    },
    'DISKSINFO' => {
    'ASMDISK02' => {
    'ASMDISK02' => {
    'TOTAL_MB' => '3914',
    'FAILGROUP' => 'ASMDISK02',
    'NAME' => 'ASMDISK02',
    'DGNAME' => 'DATA',
    'PATH' => 'ORCL:ASMDISK02'
    }
    },
    'ASMDISK01' => {
    'ASMDISK01' => {
    'TOTAL_MB' => '3914',
    'FAILGROUP' => 'ASMDISK01',
    'NAME' => 'ASMDISK01',
    'DGNAME' => 'DATA',
    'PATH' => 'ORCL:ASMDISK01'
    }
    },
    'ASMDISK04' => {
    'ASMDISK04' => {
    'TOTAL_MB' => '3914',
    'FAILGROUP' => 'ASMDISK04',
    'NAME' => 'ASMDISK04',
    'DGNAME' => 'DATA',
    'PATH' => 'ORCL:ASMDISK04'
    }
    },
    'ASMDISK03' => {
    'ASMDISK03' => {
    'TOTAL_MB' => '3914',
    'FAILGROUP' => 'ASMDISK03',
    'NAME' => 'ASMDISK03',
    'DGNAME' => 'DATA',
    'PATH' => 'ORCL:ASMDISK03'
    }
    }
    },
    'DGINFO' => {
    'DGTORESTORE' => 0,
    'DGCOMPAT' => '11.2.0.0.0',
    'DGNAME' => 'DATA',
    'DGDBCOMPAT' => '10.1.0.0.0',
    'DGTYPE' => 'NORMAL',
    'DGAUSZ' => '1048576'
    },
    'ALIASINFO' => {
    '6' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 1,
    'ALIASNAME' => 'cluster01/ASMPARAMETERFILE',
    'REFERENCE_INDEX' => '16777322'
    },
    '3' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 1,
    'ALIASNAME' => 'ORCL/CONTROLFILE',
    'REFERENCE_INDEX' => '16777534'
    },
    '7' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 1,
    'ALIASNAME' => 'ORCL/PARAMETERFILE',
    'REFERENCE_INDEX' => '16777693'
    },
    '2' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 1,
    'ALIASNAME' => 'ORCL/ONLINELOG',
    'REFERENCE_INDEX' => '16777587'
    },
    '8' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 1,
    'ALIASNAME' => 'cluster01/OCRFILE',
    'REFERENCE_INDEX' => '16777375'
    },
    '1' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 0,
    'ALIASNAME' => 'cluster01',
    'REFERENCE_INDEX' => '16777269'
    },
    '4' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 1,
    'ALIASNAME' => 'ORCL/DATAFILE',
    'REFERENCE_INDEX' => '16777481'
    },
    '0' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 0,
    'ALIASNAME' => 'ORCL',
    'REFERENCE_INDEX' => '16777428'
    },
    '5' => {
    'DGNAME' => 'DATA',
    'LEVEL' => 1,
    'ALIASNAME' => 'ORCL/TEMPFILE',
    'REFERENCE_INDEX' => '16777640'
    }
    },
    'TEMPLATEINFO' => {
    '11' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'AUTOBACKUP',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '7' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'ASMPARAMETERFILE',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '2' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'ARCHIVELOG',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '17' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'OCRBACKUP',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '1' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'ASM_STALE',
    'REDUNDANCY' => 'HIGH',
    'SYSTEM' => 'Y'
    },
    '18' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'ONLINELOG',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '0' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'DATAFILE',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '16' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'OCRFILE',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '13' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'CHANGETRACKING',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '6' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'ASMPARAMETERBAKFILE',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '3' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'FLASHFILE',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '9' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'TEMPFILE',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '12' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'XTRANSPORT',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '14' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'FLASHBACK',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '15' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'DATAGUARDCONFIG',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '8' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'PARAMETERFILE',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '4' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'FINE',
    'TEMPNAME' => 'CONTROLFILE',
    'REDUNDANCY' => 'HIGH',
    'SYSTEM' => 'Y'
    },
    '10' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'BACKUPSET',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    },
    '5' => {
    'DGNAME' => 'DATA',
    'STRIPE' => 'COARSE',
    'TEMPNAME' => 'DUMPSET',
    'REDUNDANCY' => 'MIRROR',
    'SYSTEM' => 'Y'
    }
    }
    }
    );


    NOTE:

    To recreate dropped diskgroup with the same configuration restore the same diskgroup with the diskgroup backup like:

    asmcmd> md_restore /home/grid/data_backup_file --full -G DATA

    Hope its clear now.


    Thanks,

    Ashish Shukla
  • 7. Re: How to take ASM database/Instance backup?
    987709 Newbie
    Currently Being Moderated
    Thank you Ashish for your prompt response.

    Now i got idea about ASM backup.

    using md_backup command, we able to take ASM metadata backup of allias, dg disks, tempalate


    If ASM storage got crashed, we adds new ASM storage. how we can recoverer ASM Instance? (Note: we have backup of whole ASM metadata before crashed using md_backup)


    is below steps correct?

    1. restore ASM metadata using md_restore.
    2. restore missing datafiles from RMAN backup.

    Kindly suggest. also kindly share good document of ASM if any.

    Thank you,
    Nitin
  • 8. Re: How to take ASM database/Instance backup?
    AshishShukla Newbie
    Currently Being Moderated
    Hi,

    Yes, first start ASM instance then restore metadata (means recreate all the diskgroups) and then finally restore all database files.

    If you want more details about ASM please refer Oracle Documentation and McGraw.Hill.Oracle.Automatic.Storage.Management.Nov.2007


    Thanks,
    Ashish Shukla
  • 9. Re: How to take ASM database/Instance backup?
    987709 Newbie
    Currently Being Moderated
    Hi Ashish,

    ASM have its own small database. i want take ASM database instance bakcup using RMAN.

    How can i do that. please give some hint.

    Thank you,
    Nitin

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points