InfoScale™ 9.0 Solutions Guide - Linux
- Section I. Introducing Veritas InfoScale
- Section II. Solutions for Veritas InfoScale products
- Solutions for Veritas InfoScale products
- Solutions for Veritas InfoScale products
- Section III. Stack-level migration to IPv6 or dual stack
- Section IV. Improving database performance
- Overview of database accelerators
- Improving database performance with Veritas Concurrent I/O
- Improving database performance with atomic write I/O
- Section V. Using point-in-time copies
- Understanding point-in-time copy methods
- Backing up and recovering
- Preserving multiple point-in-time copies
- Online database backups
- Backing up on an off-host cluster file system
- Database recovery using Storage Checkpoints
- Backing up and recovering in a NetBackup environment
- Off-host processing
- Creating and refreshing test environments
- Creating point-in-time copies of files
- Section VI. Maximizing storage utilization
- Optimizing storage tiering with SmartTier
- Optimizing storage with Flexible Storage Sharing
- Optimizing storage tiering with SmartTier
- Section VII. Migrating data
- Understanding data migration
- Offline migration from LVM to VxVM
- Offline conversion of native file system to VxFS
- Online migration of a native file system to the VxFS file system
- Migrating a source file system to the VxFS file system over NFS v4
- VxFS features not available during online migration
- Migrating storage arrays
- Migrating data between platforms
- Overview of the Cross-Platform Data Sharing (CDS) feature
- CDS disk format and disk groups
- Setting up your system to use Cross-platform Data Sharing (CDS)
- Maintaining your system
- Disk tasks
- Disk group tasks
- Displaying information
- File system considerations
- Specifying the migration target
- Using the fscdsadm command
- Maintaining the list of target operating systems
- Migrating a file system on an ongoing basis
- Converting the byte order of a file system
- Migrating from Oracle ASM to Veritas File System
- Section VIII. Veritas InfoScale 4K sector device support solution
- Section IX. REST API support
- Support for configurations and operations using REST APIs
- Support for configurations and operations using REST APIs
- Section X. Reference
Creating a replica database
After you prepare the snapshot, you are ready to create a replica of the database.
To create the replica database
- 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 the example. Note that to allow recovery from any backups taken from snapshots, the database must be in LOGRETAIN RECOVERY mode.
#!/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. db2 <<! connect to database set write suspend for database quit !
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 the example.
#!/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 <<! quiesce database tag hold database1[, database2]... [for external dump] go quit !
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.
- Refresh the contents of the snapshot volumes from the original volume using the following command:
# vxsnap -g database_dg refresh snapvol source=vol \ [snapvol2 source=vol2]...
For example, to refresh the snapshots svol1, svol2 and svol3:
# vxsnap -g database_dg refresh svol1 source=vol1 \ svol2 source=vol2 svol3 source=vol3
- If you temporarily suspended updates to volumes in step 1, perform the following steps.
Release all the tablespaces or databases from suspend, hot backup or quiesce mode:
As the DB2 database administrator, use a script such as that shown in the example.
#!/bin/ksh # # script: backup_end.sh # # Sample script to resume I/O for a DB2 database. # db2 <<! connect to database set write resume for database quit !
As the Sybase database administrator, release the database from quiesce mode using a script such as that shown in the example.
#!/bin/ksh # # script: backup_end.sh # # Sample script to release example Sybase ASE database from # quiesce mode. isql -Usa -Ppassword -SFMR <<! quiesce database tag release go quit !
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.
- For each snapshot volume containing tablespaces, check the file system that it contains, and mount the volume using the following commands:
# fsck -t vxfs /dev/vx/rdsk/diskgroup/snapvol # mount -t vxfs /dev/vx/dsk/diskgroup/snapvol mount_point
For example, to check the file system in the snapshot volume snap1_dbase_vol, and mount it on /rep_dbase_vol:
# fsck -t vxfs /dev/vx/rdsk/database_dg/snap1_dbase_vol # mount -t vxfs /dev/vx/dsk/database_dg/snap1_dbase_vol \ /rep_dbase_vol
- Copy any required log files from the primary database to the replica database.
For a Sybase ASE database, if you specified the for external dump clause when you quiesced the database, use the following isql command as the database administrator to dump the transaction log for the database:
dump transaction to dump_device with standby_access
Then copy the dumped transaction log to the appropriate replica database directory.
As the database administrator, start the new database:
For a Sybase ASE database, use a script such as that shown in the example.
#!/bin/ksh # # script: startdb.sh <list_of_database_volumes> # # 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). for i in $* do fsck -t vxfs /dev/vx/rdsk/$snapvoldg/snap_$i mount -t vxfs /dev/vx/dsk/$snapvoldg/snap_$i \ ${rep_mnt_point}/$i done # Start the replica database. # Specify the -q option if you specified the "for external \ # dump" clause when you quiesced the primary database. # See the Sybase ASE 12.5 documentation for more information. /sybase/ASE-12_5/bin/dataserver \ [-q] \ -sdatabase_name \ -d /sybevm/master \ -e /sybase/ASE-12_5/install/dbasename.log \ -M /sybase # Online the database. Load the transaction log dump and # specify "for standby_access" if you used the -q option # with the dataserver command. isql -Usa -Ppassword -SFMR <<! [load transaction from dump_device with standby_access go] online database database_name [for standby_access] go quit !
If you are using the warm standby method, specify the -q option to the dataserver command. Use the following isql commands to load the dump of the transaction log and put the database online:
load transaction from dump_device with standby_access 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
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 1 to refresh the contents of the snapshot from the original volume.
More Information