VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide 4.1 HP-UX 11i v2 Manufa cturing Part Nu mber: 5 991-121 5 September 2005 Edition 1 Printed in the United States © Copyright 2005 - 2006 Hewlett-Packard Development Company L.P.
Legal Notices Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 How This Guide Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Considerations for Placing DCO Plexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Creating a Volume for Use as a Full-Sized Instant Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . 23 Creating a Shared Cache Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Tuning the autogrow Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Chapter 3.
Script to Release Sybase ASE Database from Quiesce Mode . . . . . . . . . . . . . . . . . . . . . . . . . 73 Script to Resume I/O for a DB2 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Script to Perform Off-Host Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Script to Create an Off-Host Replica Oracle Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide
Preface The purpose of this guide is to demonstrate how to use VERITAS FlashSnapTM software to implement point-in-time copy solutions on enterprise systems. FlashSnap offers you flexible solutions for the efficient management of multiple point-in-time copies of your data, and for reducing resource contention on your business-critical servers. Note This guide supersedes the VERITAS Off-Host Processing Using FastResync Administrator’s Guide.
How This Guide Is Organized How This Guide Is Organized This guide is organized as follows: ◆ Point-In-Time Copy Solutions ◆ Setting up Volumes for Instant Snapshots ◆ Online Database Backup ◆ Off-Host Cluster File System Backup ◆ Decision Support ◆ Database Recovery ◆ Files and Scripts for Sample Scenarios ◆ Preparing a Replica Oracle Database Refer to the Release Notes for information about the other documentation that is provided with this product.
Related Documentation Related Documentation The following documents provide more information related to the installation, configuration and administration of the products described in this manual: ◆ VERITAS NetBackup BusinesServer Getting Started Guide ◆ VERITAS NetBackup BusinesServer System Administrator’s Guide ◆ VERITAS Storage Foundation for Cluster File System Installation and Configuration Guide ◆ VERITAS Storage Foundation for DB2 Database Administrator’s Guide ◆ VERITAS Storage Foundation
Conventions Conventions Convention Usage Example monospace Used for path names, commands, output, directory and file names, functions, and parameters. Read tunables from the /etc/vx/tunefstab file. monospace (bold) Indicates user input. # ls pubs italic Identifies book titles, new terms, emphasized text, and variables replaced with a name or value. bold See the ls(1) manual page for more information. C:\> dir pubs See the User’s Guide for details.
Getting Help Getting Help For technical assistance, visit http://support.veritas.com and select phone or email support. This site also provides access to resources such as TechNotes, product alerts, software downloads, hardware compatibility lists, and the VERITAS customer email notification service. Use the Knowledge Base Search feature to access additional product information, including current and past releases of product documentation.
Documentation Feedback 12 VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide
1 Point-In-Time Copy Solutions This chapter introduces the point-in-time copy solutions that you can implement using the VERITAS FlashSnapTM technology. Note To implement the Point-In-Time Copy solutions presented in this document, a valid license for VERITAS FlashSnap must be present on all the systems to which the solutions are applied. VERITAS FlashSnap offers a flexible and efficient means of managing business critical data.
Applications of Point-in-Time Copy Solutions Applications of Point-in-Time Copy Solutions The following typical activities are suitable for Point-In Time Copy solutions implemented using VERITAS FlashSnap: ◆ Data Backup—Many enterprises require 24 x 7 data availability. They cannot afford the downtime involved in backing up critical data offline.
Applications of Point-in-Time Copy Solutions Point-In-Time Copy Scenarios Point-in-time copies of volumes allow you to capture an image of a database or file system at a selected instant for use in applications such as backups, decision support, reporting, and development testing. Point-in-time copy solutions may additionally be configured to use off-host processing to remove much of the performance overhead on a production system.
VERITAS Software Used in Point-In-Time Copy Scenarios VERITAS Software Used in Point-In-Time Copy Scenarios This guide provides a number of example scenarios that illustrate how to implement point-in-time copy solutions.
VERITAS Software Used in Point-In-Time Copy Scenarios (including online backup, resizing, and file system changes) without interrupting data or system availability. The FlashSnap license enables the use of the Storage Checkpoints feature of VxFS. You can also use the following cluster-specific components with the sample scenarios where required: ◆ VERITAS Cluster Server (VCS) is a high-availability (HA) solution for cluster configurations.
VERITAS Software Used in Point-In-Time Copy Scenarios ◆ VERITAS Storage Foundation Installation Guide ◆ VERITAS File System Administrator’s Guide ◆ VERITAS NetBackup DataCenter Installation Guide ◆ VERITAS NetBackup DataCenter System Administrator’s Guide ◆ VERITAS NetBackup ServerFree Agent System Administrator’s Guide ◆ VERITAS NetBackup for Oracle ServerFree Agent System Administrator’s Guide ◆ VERITAS NetBackup BusinesServer Getting Started Guide ◆ VERITAS NetBackup BusinesServer System A
VERITAS Software Used in Point-In-Time Copy Scenarios decision support applications. Enhancements to the snapshot model allowed snapshot volumes to contain more than a single plex, reattachment of a subset of a snapshot volume’s plexes, and persistence of FastResync across system reboots or cluster restarts. Release 4.0 of VxVM introduced instant snapshots, which offer advantages over traditional third-mirror snapshots.
VERITAS Software Used in Point-In-Time Copy Scenarios ◆ After creating a Storage Checkpoint of a mounted file system, you can continue to create, remove, and update files on the file system without affecting the image of the Storage Checkpoint. ◆ Unlike file system snapshots, Storage Checkpoints are writable. ◆ To minimize disk space usage, Storage Checkpoints use free space in the file system.
VERITAS Software Used in Point-In-Time Copy Scenarios Note The VERITAS FlashSnap Agent for Symmetrix software is available with the VERITAS Storage Foundation for Oracle product. It is not currently available for DB2 or Sybase databases. A valid SYMCLI license key must be obtained from EMC to use EMC TimeFinder. The VERITAS Cluster Server Agents for VERITAS FlashSnap Agent for Symmetrix are add-ons to VERITAS Cluster Server that enable automatic recovery of FlashSnap Agent for Symmetrix operations.
Implementing Point-In Time Copy Solutions on a Primary Host Implementing Point-In Time Copy Solutions on a Primary Host The figure, “Using Snapshots and FastResync to Implement Point-In-Time Copy Solutions on a Primary Host” on page 10, illustrates the steps that are needed to set up the processing solution on the primary host. Note that the Disk Group Split/Join functionality is not used.
Implementing Point-In Time Copy Solutions on a Primary Host The figure, “Example Point-In-Time Copy Solution on a Primary Host” on page 11, shows the suggested arrangement for implementing solutions where the primary host is used and disk contention is to be avoided.
Implementing Off-Host Point-In-Time Copy Solutions Implementing Off-Host Point-In-Time Copy Solutions As shown in “Example Implementation of an Off-Host Point-In-Time Copy Solution” on page 12, by accessing snapshot volumes from a lightly loaded host (shown here as the OHP host), CPU- and I/O-intensive operations for online backup and decision support are prevented from degrading the performance of the primary host that is performing the main production activity (such as running a database).
Implementing Off-Host Point-In-Time Copy Solutions Example Connectivity for Off-Host Solution Using Redundant-Loop Access OHP Host Primary Host Network c1 c2 c3 c4 c1 c2 c3 c4 Fibre Channel Hubs/Switches Disk Arrays “Example Implementation of an Off-Host Point-In-Time Copy Solution Using a Cluster Node” on page 13 shows how off-host processing might be implemented in a cluster by configuring one of the cluster nodes as the OHP node.
Implementing Off-Host Point-In-Time Copy Solutions Alternatively, the OHP node could be a separate system that has a network connection to the cluster, but which is not a cluster node and is not connected to the cluster’s private network. This arrangement is illustrated in “Example implementation of an Off-Host Point-In-Time Copy Solution Using a Separate OHP Host” on page 14.
Implementing Off-Host Point-In-Time Copy Solutions Using VERITAS FlashSnap to implement Off-Host Processing Solutions OHP Host Primary Host or Cluster 1. Prepare the volumes If required, create an empty volume in the disk group, and use vxsnap prepare to prepare volumes for snapshot creation. Volume Empty Volume 2. Create snapshot volumes Use vxsnap make to create synchronized snapshot volumes. (Use vxsnap print to check the status of synchronization.) Volume Snapshot Volume 3.
Implementing Off-Host Point-In-Time Copy Solutions Data Integrity in Volume Snapshots A volume snapshot represents the data that exists in a volume at a given point in time. As such, VxVM does not have any knowledge of data that is cached by the overlying file system, or by applications such as databases that have files open in the file system.
2 Setting up Volumes for Instant Snapshots This chapter describes how to make volumes ready for instant snapshot creation. These may be volumes that you want to back up, or that you want to use for decision support or reporting. If a snapshot volume is to be used on the same host, and will not be moved to another host for off-host processing, you can use space-optimized instant snapshots rather than full-sized instant snapshots.
Additional Preparation Activities Additional Preparation Activities Depending on the type of snapshots that you want to create, you may need to perform additional preparatory tasks. When creating a full-sized instant snapshot, you can use one of the following two methods: ◆ Break off one or more spare plexes from the original volume to form a snapshot volume with the required redundancy. These plexes must be in the SNAPDONE state.
Preparing a Volume for Instant Snapshot Operations To upgrade a disk group, use the following command: # vxdg upgrade diskgroup 2. Use the following command to add a version 20 DCO and DCO volume to an existing volume: # vxsnap [-g diskgroup] prepare volume [ndcomirs=number] \ [regionsize=size] [alloc=storage_attribute[,...]] The ndcomirs attribute specifies the number of DCO plexes that are created in the DCO volume.
Preparing a Volume for Instant Snapshot Operations # vxsnap -g mydg addmir vol1 nmirror=2 alloc=mydg10,mydg11 Note Do not perform this step if you create a full-sized snapshot volume using a suitably prepared empty volume (see “Creating a Volume for Use as a Full-Sized Instant Snapshot” on page 23), or if you create space-optimized snapshots that use a cache (see “Creating a Shared Cache Object” on page 24).
Preparing a Volume for Instant Snapshot Operations Considerations for Placing DCO Plexes If you use the vxassist command or the VERITAS Enterprise Administrator (VEA) to create both a volume and its DCO, or the vxsnap prepare command to add a DCO to a volume, the DCO plexes are automatically placed on different disks from the data plexes of the parent volume.
Preparing a Volume for Instant Snapshot Operations Examples of Disk Groups That Can and Cannot be Split Volume Data Plexes The disk group can be split as the DCO plexes are on dedicated disks, and can therefore accompany the disks that contain the volume data. Snapshot Plex Split Volume DCO Plexes Snapshot DCO Plex Volume Data Plexes Snapshot Plex The disk group cannot be split as the DCO plexes cannot accompany their volumes. One solution is to relocate the DCO plexes.
Creating a Volume for Use as a Full-Sized Instant Snapshot Creating a Volume for Use as a Full-Sized Instant Snapshot If you want to create a full-sized instant snapshot for an original volume that does not contain any spare plexes, you can use an empty volume with the required degree of redundancy, and with the same size and same region size as the original volume. To create an empty volume for use by a full-sized instant snapshot: 1.
Creating a Shared Cache Object As an alternative to creating the snapshot volume and its DCO volume in a single step, you can first create the volume, and then prepare it for instant snapshot operations as shown here: # vxassist [-g diskgroup] make snapvol $LEN \ [layout=mirror nmirror=number] init=active [storage_attributes] # vxsnap [-g diskgroup] prepare snapvol [ndcomirs=number] \ regionsize=$RSZ [storage_attributes] Creating a Shared Cache Object If you need to create several instant space-optimized
Creating a Shared Cache Object 3. Use the vxmake cache command to create a cache object on top of the cache volume that you created in the previous step: # vxmake [-g diskgroup] cache cache_object cachevolname=volume \ [regionsize=size] [autogrow=on] [highwatermark=hwmk] \ [autogrowby=agbvalue] [maxautogrow=maxagbvalue]] If the region size, regionsize, is specified, it must be a power of 2, and be greater than or equal to 16KB (16k). If not specified, the region size of the cache is set to 64KB.
Creating a Shared Cache Object ◆ When cache usage reaches the high watermark value, vxcached deletes the oldest snapshot in the cache. If there are several snapshots with the same age, the largest of these is deleted. If there is only a single snapshot, this snapshot is detached and marked as invalid. Note The vxcached daemon does not remove snapshots that are currently open, and it does not remove the last or only snapshot in the cache.
3 Online Database Backup Online backup of a database can be implemented by configuring either the primary host or a dedicated separate host to perform the backup operation on snapshot mirrors of the primary host’s database.
Making a Backup of an Online Database on the Same Host Making a Backup of an Online Database on the Same Host As illustrated in “Example System Configuration for Database Backup on the Primary Host” on page 28, the primary database volumes to be backed up, dbase_vol and dbase_logs, are configured on disks attached to controllers c1 and c2, and the snapshots are created on disks attached to controllers c3 and c4.
Making a Backup of an Online Database on the Same Host To make a backup of an online database on the same host: 1. Use the following command to make a full-sized snapshot, snapvol, of the tablespace volume by breaking off plexes from the original volume: # vxsnap -g volumedg make source=volume/newvol=snapvol/nmirror=N The nmirror attribute specifies the number of mirrors, N, in the snapshot volume.
Making a Backup of an Online Database on the Same Host 2. 3. If the volumes to be backed up contain database tables in file systems, suspend updates to the volumes: ◆ DB2 provides the write suspend command to temporarily suspend I/O activity for a database. As the DB2 database administrator, use a script such as that shown in “Script to Suspend I/O for a DB2 Database” on page 71. Note that to allow recovery from any backups taken from snapshots, the database must be in LOGRETAIN RECOVERY mode.
Making a Backup of an Online Database on the Same Host Note On Linux, use the -t option, and on AIX, use the -V option, instead of the -F option for both commands. Back up the file system at this point using a command such as bpbackup in VERITAS NetBackup. After the backup is complete, use the following command to unmount the file system. # unmount mount_point Repeat steps 2 through 5 each time that you need to back up the volume.
Making an Off-Host Backup of an Online Database Making an Off-Host Backup of an Online Database As illustrated in “Example System Configuration for Off-Host Database Backup” on page 32, the primary database volumes to be backed up, dbase_vol and dbase_logs, are configured on disks attached to controllers c1 and c2, and the snapshots are created on disks attached to controllers c3 and c4. There is no requirement for the OHP host to have access to the disks that contain the primary database volumes.
Making an Off-Host Backup of an Online Database Note It is assumed that you have already prepared the volumes containing the file systems for the datafiles to be backed up as described in “Setting up Volumes for Instant Snapshots” on page 17. For an Oracle database, it is not necessary to create snapshots of the volumes containing the file systems for the redo log volumes or archived logs.
Making an Off-Host Backup of an Online Database 3. ◆ Oracle supports online backup by temporarily suspending updates to the datafiles of the tablespaces, provided that the database is running in archive mode and the tablespaces are online. As the Oracle database administrator, put each tablespace into hot backup mode using a script such as that shown in “Script to Put Oracle Database into Hot Backup Mode” on page 69. ◆ Sybase ASE from version 12.
Making an Off-Host Backup of an Online Database For example, to wait for synchronization to finish for all the snapshots svol1, svol2 and svol3, you would issue three separate commands: # vxsnap -g dbasedg syncwait svol1 # vxsnap -g dbasedg syncwait svol2 # vxsnap -g dbasedg syncwait svol3 Note You cannot move a snapshot volume into a different disk group until synchronization of its contents is complete. You can use the vxsnap print command to check on the progress of synchronization. 6.
Making an Off-Host Backup of an Online Database 11. On the OHP host, use the following command to deport the snapshot volume’s disk group: # vxdg deport snapvoldg 12. On the primary host, re-import the snapshot volume’s disk group using the following command: # vxdg [-s] import snapvoldg Note Specify the -s option if you are reimporting the disk group to be rejoined with a shared disk group in a cluster. 13.
Making an Off-Host Backup of an Online Database Reattaching Snapshot Plexes Note This operation is not supported for space-optimized instant snapshots. Using the following command, some or all plexes of an instant snapshot may be reattached to the specified original volume, or to a source volume in the snapshot hierarchy above the snapshot volume: # vxsnap [-g diskgroup] reattach snapvol source=vol \ [nmirror=number] By default, all the plexes are reattached, which results in the removal of the snapshot.
Making an Off-Host Backup of an Online Database 38 VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide
4 Off-Host Cluster File System Backup VERITAS Cluster File System (CFS) allows cluster nodes to share access to the same file system. CFS is especially useful for sharing read-intensive data between cluster nodes. Off-host backup of cluster file systems may be implemented by taking a snapshot of the volume containing the file system and performing the backup operation on a separate host.
System Configuration for Off-Host File System Backup Scenarios Network Cluster nodes OHP host Local disks Local disks Controllers Controllers c1 c2 c3 c4 c1 c2 c3 c4 c1 c2 c3 c4 c1 c2 c3 c4 Volumes created on these disks are accessed by the cluster nodes Disk Arrays c1 c2 c3 c4 Snapshot volumes created on these disks are accessed by all hosts Back up to disk, tape or other media by OHP host 40 VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide
Mounting a File System for Shared Access Mounting a File System for Shared Access To mount a VxFS file system for shared access, use the following command on each cluster node where required: # mount -F vxfs -o cluster /dev/vx/dsk/diskgroup/volume mount_point For example, to mount the volume cfs_vol in the disk group exampledg for shared access on the mount point, /mnt_pnt: # mount -F vxfs -o cluster /dev/vx/dsk/exampledg/cfs_vol /mnt_pnt Using Off-Host Processing to Back Up Cluster File Systems Note It
Using Off-Host Processing to Back Up Cluster File Systems 2. On the master node, refresh the contents of the snapshot volumes from the original volume using the following command: # vxsnap -g volumedg refresh snapvol source=vol \ [snapvol2 source=vol2]... syncing=yes The syncing=yes attribute starts a synchronization of the snapshot in the background. For example, to refresh the snapshot scfs_vol: # vxsnap -g exampledg refresh scfs_vol source=cfs_vol syncing=yes 3.
Using Off-Host Processing to Back Up Cluster File Systems 7. The snapshot volume is initially disabled following the split. Use the following commands on the OHP host to recover and restart the snapshot volume: # vxrecover -g snapvoldg -m snapvol # vxvol -g snapvoldg start snapvol 8.
Using Off-Host Processing to Back Up Cluster File Systems 14. When the backup is complete, use the following command to unmount the snapshot volume, and make it ready for its contents to be refreshed from the primary volume: # umount mount_point When synchronization is complete, the snapshot is ready to be re-used for backup. Caution Before attempting to unmount the snapshot, shut down all applications that access a file system in the snapshot volume, and also unmount any such file system.
Using Off-Host Processing to Back Up Cluster File Systems While the reattached plexes are being resynchronized from the data in the parent volume, they remain in the SNAPTMP state. After resynchronization is complete, the plexes are placed in the SNAPDONE state.
Using Off-Host Processing to Back Up Cluster File Systems 46 VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide
5 Decision Support You can use snapshots of a primary database to create a replica of the database at a given moment in time. You can then implement decision support analysis and report generation operations that take their data from the database copy rather than from the primary database. The FastResync functionality of VERITAS Volume Manager (VxVM) allows you to quickly refresh the database copy with up-to-date information from the primary database.
Creating a Replica Database on the Same Host Creating a Replica Database on the Same Host As illustrated in “Example System Configuration for Decision Support on the Primary Host” on page 48, the primary database volumes to be backed up, dbase_vol and dbase_logs, are configured on disks attached to controllers c1 and c2, and the snapshots are created on disks attached to controllers c3 and c4.
Creating a Replica Database on the Same Host To set up a replica database to be used for decision support on the primary host: 1. If you have not already done so, prepare the host to use the snapshot volume that contains the copy of the database tables. Set up any new database logs and configuration files that are required to initialize the database. 2.
Creating a Replica Database on the Same Host 3. If the volumes to be backed up contain database tables in file systems, suspend updates to the volumes: ◆ DB2 provides the write suspend command to temporarily suspend I/O activity for a database. As the DB2 database administrator, use a script such as that shown in “Script to Suspend I/O for a DB2 Database” on page 71. Note that to allow recovery from any backups taken from snapshots, the database must be in LOGRETAIN RECOVERY mode.
Creating a Replica Database on the Same Host If you are using Sybase ASE 12.5, you can specify the for external dump clause to the quiesce command. This warm standby method allows you to update a replica database using transaction logs dumped from the primary database. See “Updating a Warm Standby Sybase ASE 12.5 Database” on page 59 for more information. 6.
Creating a Replica Database on the Same Host If you are not using the warm standby method, use the following isql command to recover the database, roll back any uncommitted transactions to the time that the quiesce command was issued, and put the database online: online database database_name When you want to resynchronize a snapshot with the primary database, shut down the replica database, unmount the snapshot volume, and go back to step 3 to refresh the contents of the snapshot from the original volume
Creating an Off-Host Replica Database Creating an Off-Host Replica Database As illustrated in “Example System Configuration for Off-Host Decision Support” on page 53, the primary database volumes to be backed up, dbase_vol and dbase_logs, are configured on disks attached to controllers c1 and c2, and the snapshots are created on disks attached to controllers c3 and c4. There is no requirement for the OHP host to have access to the disks that contain the primary database volumes.
Creating an Off-Host Replica Database Note It is assumed that you have already prepared the database volumes to be replicated as described in “Setting up Volumes for Instant Snapshots” on page 17. To set up a replica database to be used for decision support on an OHP host: 1. If you have not already done so, prepare the OHP host to use the snapshot volume that contains the copy of the database tables. Set up any new database logs and configuration files that are required to initialize the database.
Creating an Off-Host Replica Database ◆ Sybase ASE from version 12.0 onward provides the Quiesce feature to allow temporary suspension of writes to a database. As the Sybase database administrator, put the database in quiesce mode by using a script such as that shown in “Script to Quiesce Sybase ASE Database” on page 70. If you are using Sybase ASE 12.5, you can specify the for external dump clause to the quiesce command.
Creating an Off-Host Replica Database For example, to wait for synchronization to finish for all the snapshots svol1, svol2 and svol3, you would issue three separate commands: # vxsnap -g dbasedg syncwait svol1 # vxsnap -g dbasedg syncwait svol2 # vxsnap -g dbasedg syncwait svol3 Note You cannot move a snapshot volume into a different disk group until synchronization of its contents is complete. You can use the vxsnap print command to check on the progress of synchronization. 7.
Creating an Off-Host Replica Database Note For a replica DB2 database, the database volume must be mounted in the same location as on the primary host. 12. Copy any required log files from the primary host to the OHP host: ◆ For an Oracle database on the OHP host, copy the archived log files that were generated while the database was in hot backup mode to the new database’s archived log directory (for example, /rep/archlog).
Creating an Off-Host Replica Database online database database_name for standby_access If you are not using the warm standby method, use the following isql command to recover the database, roll back any uncommitted transactions to the time that the quiesce command was issued, and put the database online: online database database_name Resynchronizing the Data with the Primary Host When you want to resynchronize a snapshot with the primary database, follow these steps: 1.
Creating an Off-Host Replica Database Updating a Warm Standby Sybase ASE 12.5 Database If you specified the for external dump clause when you quiesced the primary database, and you started the replica database by specifying the -q option to the dataserver command, you can use transaction logs to update the replica database. As the database administrator, perform the following steps each time that you want to update the replica database: 1.
Creating an Off-Host Replica Database 60 VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide
6 Database Recovery You can use VERITAS Storage Checkpoints to implement efficient backup and recovery of databases that have been laid out on VxFS file systems. A Storage Checkpoint allows you to roll back an entire database, a tablespace, or a single database file to the time that the Storage Checkpoint was taken. Rolling back to or restoring from any Storage Checkpoint is generally very fast because only the changed data blocks need to be restored.
Creating Storage Checkpoints Creating Storage Checkpoints To create storage checkpoints, select 3 Storage Checkpoint Administration > Create New Storage Checkpoints in the VxDBA utility. This can be done with a database either online or offline. Note To create a Storage Checkpoint while the database is online, ARCHIVELOG mode must be enabled in Oracle. During the creation of the Storage Checkpoint, the tablespaces are placed in backup mode.
Rolling Back a Database 4. Use one of the following commands to perform an incomplete media recovery of the database: ◆ Recover the database until you stop the recovery: recover database until cancel; ...
Rolling Back a Database 64 VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide
A Files and Scripts for Sample Scenarios Note These scripts are not supported by VERITAS, and are provided for informational use only. You can purchase customization of the environment through VERITAS Vpro Consulting Services. For contact details, see “Conventions” on page 10. This appendix contains the following configuration files and scripts for the sample point-in-time copy processing scenarios described in this guide: File or Script Used for...
File or Script Used for...
Script to Initiate Online Off-Host Oracle Database Backup Script to Initiate Online Off-Host Oracle Database Backup #!/bin/ksh # # script: backup_online.sh # # Sample script for online, off-host backup. # # Note: This is not a production level script, its intention is to help # you understand the procedure and commands for implementing # an off-host point-in-time copy solution.
Script to Initiate Online Off-Host Oracle Database Backup # Move the snapshot volumes into a separate disk group. vxdg split $dbasedg $snapdg $vollist # Deport the snapshot disk group. vxdg deport $snapdg # The snapshots of the database can be imported and backed up # on the OHP node and then deported. # Note: Replace “rsh” with “remsh” on HP-UX systems. rsh $dbnode -c “do_backup.
Script to Put Oracle Database into Hot Backup Mode Script to Put Oracle Database into Hot Backup Mode #!/bin/ksh # # script: backup_start.sh # # Sample script to put example Oracle database into hot backup mode. export ORACLE_SID=dbase export ORACLE_HOME=/oracle/816 export PATH=$ORACLE_HOME/bin:$PATH svrmgrl <
Script to Quiesce Sybase ASE Database Script to Quiesce Sybase ASE Database #!/bin/ksh # # script: backup_start.sh # # Sample script to quiesce example Sybase ASE database. # # Note: The “for external dump” clause was introduced in Sybase # ASE 12.5 to allow a snapshot database to be rolled forward. # See the Sybase ASE 12.5 documentation for more information. isql -Usa -Ppassword -SFMR <
Script to Suspend I/O for a DB2 Database Script to Suspend I/O for a DB2 Database #!/bin/ksh # # script: backup_start.sh # # Sample script to suspend I/O for a DB2 database. # # Note: To recover a database using backups of snapshots, the database # must be in LOGRETAIN mode.
Script to End Oracle Database Hot Backup Mode Script to End Oracle Database Hot Backup Mode #!/bin/ksh # # script: backup_end.sh # # Sample script to end hot backup mode for example Oracle database. export ORACLE_SID=dbase export ORACLE_HOME=/oracle/816 export PATH=$ORACLE_HOME/bin:$PATH svrmgrl <
Script to Release Sybase ASE Database from Quiesce Mode Script to Release Sybase ASE Database from Quiesce Mode #!/bin/ksh # # script: backup_end.sh # # Sample script to release example Sybase ASE database from quiesce mode.
Script to Resume I/O for a DB2 Database Script to Resume I/O for a DB2 Database #!/bin/ksh # # script: backup_end.sh # # Sample script to resume I/O for a DB2 database.
Script to Perform Off-Host Backup Script to Perform Off-Host Backup #!/bin/ksh # # script: do_backup.sh # # Sample script for off-host backup # # Note: This is not a production level script, its intention is to help # you understand the procedure and commands for implementing # an off-host point-in-time copy solution. # Modify the following procedure according to your environment # and backup method. snapvoldg=snapdbdg # Import the snapshot volume disk group.
Script to Create an Off-Host Replica Oracle Database Script to Create an Off-Host Replica Oracle Database #!/bin/ksh # # script: create_dss.sh # # Sample script to create a replica Oracle database on an OHP host. # # Note: This is not a production level script, its intention is to help # you understand the procedure and commands for implementing # an off-host point-in-time copy solution.
Script to Create an Off-Host Replica Oracle Database # # # # Copy the archive logs that were generated while the database was in hot backup mode (as reported by the Oracle Server Manager) to the archive log location for the replica database on the OHP node (in this example, /rep/archlog). rcp ${arch_loc}/* $dbnode:${rep_mnt_point}${arch_loc} # The snapshots of the database can be now imported on the OHP node # and used to complete, recover and start the replica database.
Script to Complete, Recover and Start Replica Oracle Database Script to Complete, Recover and Start Replica Oracle Database #!/bin/ksh # # script: startdb.sh # # Sample script to complete, recover and start replica Oracle database. # # It is assumed that you have already performed the following # steps: # 1. Create the local volumes, file systems, and mount points for the # redo and archived logs, and then mount them. # 2.
Script to Complete, Recover and Start Replica Oracle Database svrmgrl <
Script to Start Replica Sybase ASE Database Script to Start Replica Sybase ASE Database #!/bin/ksh # # script: startdb.sh # # Sample script to recover and start replica Sybase ASE database. # Import the snapshot volume disk group. vxdg import $snapvoldg # Mount the snapshot volumes (the mount points must already exist).
B Preparing a Replica Oracle Database This appendix describes how to set up a replica off-host Oracle database to be used for decision support as described in “Creating an Off-Host Replica Database” on page 53. To prepare a replica Oracle database on a host other than the primary host: 1. If not already present, install the Oracle software onto the host’s local disks. The location of the Oracle home directory ($ORACLE_HOME) is used for the database instance that is created from the snapshot volumes.
4. Create the mount points that are to be used to mount the new database. For example, create /rep/dbase_vol for the snapshot of the tablespace volume, /rep/dbase_logs for the redo logs, and /rep/dbase_arch for the archived logs: # mkdir -p /rep/dbase_vol # mkdir -p /rep/dbase_logs # mkdir -p /rep/dbase_arch 5.
c. If required, change the following line: CREATE CONTROLFILE REUSE DATABASE "odb" NORESETLOGS ARCHIVELOG so that it reads: CREATE CONTROLFILE SET DATABASE "ndb" RESETLOGS NOARCHIVELOG where odb is the name of the original database and ndb is the name of the replica database (DBASE and REP1 in the example). Note that to reduce unnecessary overhead, the new database is not run in archive log mode. See “SQL Script to Create Control File” on page 85 for an example. 8.
Text Control File for Original Production Database Text Control File for Original Production Database /oracle/816/admin/dbase/udump/dbase_ora_20480.trc Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production With the Partitioning option JServer Release 8.1.6.0.0 - Production ORACLE_HOME = /oracle/816 System name: SunOS Node name: node01 Release: 5.
SQL Script to Create Control File SQL Script to Create Control File STARTUP NOMOUNT CREATE CONTROLFILE SET DATABASE “REP1” RESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 2 MAXDATAFILES 70 MAXINSTANCES 1 MAXLOGHISTORY 226 LOGFILE GROUP 1 ’/rep/dbase_vol/log1’ SIZE 52428288, # . # . List of log files # . GROUP N ’/rep/dbase_vol/logN’ SIZE 52428288 DATAFILE ’/rep/dbase_vol/ts1’, # . # . List of tablespace datafiles # .
Initialization File for Original Production Database Initialization File for Original Production Database #==================================================================+ # FILENAME initdbase.ora # DESCRIPTION Oracle parameter file for primary database, dbase.
Initialization File for Replica Oracle Database Initialization File for Replica Oracle Database ##==================================================================+ # FILENAME initREP1.ora # DESCRIPTION Oracle parameter file for replica database, REP1.
Initialization File for Replica Oracle Database 88 VERITAS FlashSnap Point-In-Time Copy Solutions Administrator’s Guide
Index A ARCHIVELOG mode 62 attributes autogrowby 25 highwatermark 25 init 23 ndcomirror 23 nmirror 23 regionsize 25 tuning the autogrow feature 25 autogrow feature tuning attributes 25 autogrowby attribute 25 B backup of cluster file systems 39 of online databases 27 BCV 8 Business Continuance Volume (BCV) 8 considerations for disk layout 21 effect on disk group split and join 21 moving log plexes 20 decision support using Point-In-Time Copy solutions 47 Disk Group Split/Join 7 disk groups layout of DCO pl
Non-Persistent FastResync 6 resynchronizing 16 third-mirror 7 space-optimized instant snapshots 7 storage cache 7 Storage Checkpoints 8 administering with VxDBA 61 creating 62 database recovery 61 Storage Rollback implementing using Storage Checkpoints 61 using VxDBA 62 Symmetrix 8 O off-host backup of cluster file systems using Point-In-Time Copy solutions 39 online database backup using Point-In-Time Copy solutions 27 P Persistent FastResync 6 plexes moving 20 Point-In-Time Copy solutions applications 2