Previous  |  Next  >  
Product: Storage Foundation for Oracle RAC Guides   
Manual: Storage Foundation 4.1 for Oracle RAC Installation and Configuration   

Backing Up and Recovering the Database Using Storage Checkpoints

Storage Checkpoints can be created by specifying one of the following options: online, offline, or instant. To create a Storage Checkpoint with the online option, the database should be online and you must enable ARCHIVELOG mode for the database. During the creation of the Storage Checkpoint, the tablespaces are placed in backup mode. Because it only takes a few seconds to take a Storage Checkpoint, the extra redo logs generated while the tablespaces are in online-backup mode are very small. You can roll back the entire database or individual tablespaces or datafiles to an online or offline Storage Checkpoint. After the rollback is complete, rolling the database forward is supported with online Storage Checkpoints. For the instant option, the database should be online and it can be running in either ARCHIVELOG or NOARCHIVELOG mode. You can only roll back the entire database to an instant Storage Checkpoint. After the rollback is complete, you need to perform Oracle database storage rollback instance recovery. Rolling the database forward is not supported; that is, you cannot apply archived redo logs.


Note   Note    For best recoverability, always keep ARCHIVELOG mode enabled, regardless of whether the database is online or offline when you create Storage Checkpoints.

Since the Storage Checkpoints record the before images of blocks that have changed, you can use them to do a disk-based or file-system-based storage rollback to the exact time when the Storage Checkpoint was taken. You can consider Storage Checkpoints as backups that are online, and you can use them to roll back an entire database tablespace, or a single database file. Rolling back to or restoring from any Storage Checkpoint is generally very fast because only the changed data blocks need to be restored.


Note   Note    Some database changes made after a Storage Checkpoint was taken may make it impossible to recover the database after storage rollback. For example, you may not be able to recover the database after a successful rollback if the control files for the database have recorded the addition or removal of datafiles. To provide recovery options, a backup copy of the control file for the database is saved under the $VXDBA_DBPATH/$ORACLE_SID/checkpoint_dir/CKPT_NAME directory immediately after a Storage Checkpoint is created. You can use this file to assist with database recovery, if necessary. If possible, both ASCII and binary versions of the control file will be left under the $VXDBA_DBPATH/$ORACLE_SID/checkpoint_dir/CKPT_NAME directory. The binary version will be compressed to conserve space. Use extreme caution when recovering your database using alternate control files.

Storage Checkpoints can only be used to restore from logical errors (for example, a human error). Because all the data blocks are on the same physical device, Storage Checkpoints cannot be used to restore files due to a media failure. A media failure requires a database restore from a tape backup or a copy of the database files kept on a separate medium. The combination of data redundancy (disk mirroring) and Storage Checkpoints is recommended for highly critical data to protect them from both physical media failure and logical errors.

Backing Up Using the Command Line

You can back up a database by creating a Storage Checkpoint using the sfrac_ckptcreate command, mounting the Storage Checkpoint as read-only using the sfrac_ckptmount command, and then backing it up using tools such as tar or cpio.

Usage Notes

  To back up a frozen database image using the command line


Note   Note    In this example, all the database datafiles reside on one VxFS file system named /db01.
  1. Create a Storage Checkpoint using the sfrac_ckptcreate command:
       $ /opt/VRTS/bin/sfrac_ckptcreate -S DB12 -H $ORACLE_HOME \    -o
       online
       NOTICE: Creating online Storage Checkpoint of database DB12.
       Storage Checkpoint Checkpoint_1068762379 created.
  2. Mount the Storage Checkpoint using the sfrac_ckptmount command:
    $ /opt/VRTS/bin/sfrac_ckptmount-S DB12 -c \
    Checkpoint_1068762379 -m /ckptmnt
  3. Use tar to back up the Storage Checkpoint:
       $ cd /ckptmnt
       $ ls
       db01
       $ tar cvf /tmp/DB12_db1_1068762379.tar ./db01
 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Oracle RAC Guides  
Manual: Storage Foundation 4.1 for Oracle RAC Installation and Configuration  
VERITAS Software Corporation
www.veritas.com