. de IX . ds #H ((1u-(\\n(.fu%2u))*.13m) . ds ’ \k:' test veritas logo


vxsfadm-oracle-flashsnap(1M)

NAME

Flashsnap - Third mirror brak-off snapshots using vxsfadm

SYNOPSIS

vxsfadm -s flashsnap -a <app_name> --<app_id> <value> --flashsnap_name <config_name> -o <operation> [ --config_param <value> ... ]

vxsfadm -s flashsnap -a <app_name> -c <config_file> -o <operation> [ --config_param <value> ... ]

DESCRIPTION

Veritas Database FlashSnap helps to create a point-in-time copy of a database for backup and off-host processing. Database FlashSnap lets you make backup copies of your volumes online and with minimal interruption to users.

Database FlashSnap lets you capture an online image of an actively changing database at a given instant that is known as a snapshot. A snapshot copy of the database is referred to as a database snapshot. You can use a database snapshot on the same host as the production database or on a secondary host sharing the same storage.A database snapshot can be used for off-host processing applications, such as backup, data warehousing, and decision-support queries. When the snapshot is no longer needed, the database administrator can import the original snapshot back to the primary host and resynchronize the snapshot to the original database volumes. Database FlashSnapcommandsare executed from the command line interface.

Flashsnap service provides traditional volume level Snapshot (Third mirror break-off, full sized snapshot)

Traditional snapshot creates a full size, volume-level snapshot image of an volume, by splitting the mirror volumes. One can use the snapshot image on either the same host where the application is running or on a secondary host, provided storage is shared by the two hosts.

Flashsnap service is supported on local mount and CFS mounts. User needs to tag a mirror which needs to be split. At the time of splitting the mirror, all the i/o to the volume would be frozen to get a consistent image of the volume. Splitting of mirror is a automic operation and is done in a fraction of a second.

SUPPORTED OPERATIONS

SETDEFAULTS Generates the default configuration file for application.
VALID Validates the configuration file and environment.

Operation alias : VALIDATE

SNAP Breaks the mirror and splits the disk group.

Operation alias : SNAPSHOT, BREAK

MOUNT Mounts the Mirror volumes on specified mount point (See configuration parameter CLONE_PATH). If the mount location is not specified, it will mount the snapshot in /tmp.

Operation alias : SNAPMOUNT

UNMOUNT Umounts the snapshots, if clone is created, would shutdown the clone.

Operation alias : UMOUNT, SNAPUNMOUNT, SNAPUMOUNT

PRECLONE Oracle specific operation, where database is opened in mount state without applying archive log.

Operation alias : MOUNTDB

CLONE Clone the application to a new instance. New instance can be named using parameter CLONE_NAME. If no name is specified, a default name for the clone will be generated.

Operation alias : CLONEDB

RESYNC Resyncs the mirror with primary volumes.
REVERSERESYNCBEGIN Mount snapshot volumes and bring up Oracle instance (preview session) using this operation. It allows user to verify backup data before restoring it onto primary volumes.

NOTE: Before performing reverse resynchronization, back up repository using sfua_rept_util tool. Also, if you make any structural change to database (e.g. adding a new datafile), then it is a good idea to back it up using FlashSnap snapshot commands.

Operation alias : RRBEGIN, RRSTART, REVERSERESYNCSTART

REVERSERESYNCABORT End reverse resync preview session and get back to original data volumes.

Operation alias : RRABORT, RRCANCEL, REVERSERESYNCCANCEL

REVERSERESYNCCOMMIT Commit reverse resync changes previewed in RRBegin operation. After this operation finishes, user cannot go back to original data volumes. It will permanently restore the snapshot volumes onto data volumes.

Operation alias : RRCOMMIT, RRFINISH, REVERSERESYNCFINISH

LIST Lists available snapshot configurations.
DESTROY Destroys the flashsnap configuration from the repository

Operation alias : DELETE, REMOVE

CONFIGURATION PARAMETERS

Configuration parameters allow users to control snapshot operation. Almost all of the configuration parameters are optional (with the exception of application instance name and configuration name). Parameters can be specified in a configuration file (using ’-c <configfile>’ option of vxsfadm) or as command-line arguments (command line option) to vxsfadm. Following is the list of parameters for Oracle database snapshot service.

FLASHSNAP_NAME

Description User-defined name of the snapshot configuration. This name is used for referring a particular snapshot for performing any operation. It is also used in listing snapshots (vxsfadm -o list option).
Valid Values Character string. Ex. snap1. This parameter is not optional.
Command line option --flashsnap_name <value> or --name <value>

VERSION

Description Version of snapplan or snapshot configuration.
Valid Values <number>.<number> Ex. 6.0
Command line option none

ORACLE_SID

Description Session ID of Oracle database for which snapshot is to be taken.
Valid Values Character string. Ex. orcldb. This parameter is not optional. It can be specified as environment variable.
Command line option --oracle_sid <value> or -S <value>

ORACLE_HOME

Description Oracle home parameter of the corresponding Oracle SID.
Valid Values Valid path. Ex. /oracle/11gr2. This parameter is not optional. It can be specified as environment variable.
Command line option --oracle_home <value> or -H <value>

APP_MODE

Description Mode of application when snapshot operation is to be performed.
Valid Values Offline, online or instant Default value is online.
Command line option --app_mode <value> or --online | offline | instant

CLONE_NAME

Description Name of application instance that is be created during clone operation.
Valid Values Character string. Ex. clone1 If not specified, clone name is auto-generated.
Command line option --clone_name=<value>

CLONE_PATH

Description Filesystem path on which the clone application instance is to be mounted.
Valid Values Valid path. Ex. /tmp/cln If not specified, clone path is auto-generated.
Command line option --clone_path <value> or --mount_path <value> or --on <value> or --at <value>

SNAPSHOT_VOL_PREFIX

Description Prefix for snapshot volumes.
Valid Values Character string. Ex. SNP_ Default prefix is SNAP_.
Command line option --snapshot_vol_prefix <value> or --prefix <value>

SNAPSHOT_DG_PREFIX

Description Prefix for snapshot diskgroup(s).
Valid Values Character string. Ex. SNP_ Default prefix is SNAP_.
Command line option --snapshot_dg_prefix <value> or --prefix <value>

SNAPSHOT_PLEX_TAG

Description User needs to tag the mirror which is to be split during snapshot operation. If no mirror is tagged, snapshot operation would error out.
Valid Values Character string. Ex. snapshot_plex Default value is dbed_flashsnap.
Command line option --snapshot_plex_tag <value> or --plex <value>

SNAPSHOT_MIRROR

Description Number of set of mirrors that have snapshot plex tag set.
Valid Values Number. Ex. 2 Default value is 1.
Command line option --snapshot_mirror <value> or --n <value>

SNAPSHOT_ARCHIVE_LOG

Description Specifies whether Oracle archive log volumes are to be included in snapshot.
Valid Values Yes or no Default is yes.
Command line option --snapshot_archive_log y|n or --snapshot_archive_log or --no_snapshot_archive_log

REVERSE_RESYNC_ARCHIVE_LOG

Description Specifies whether Oracle archive log volumes are to be reverse resynchronized. This option is useful when, for example, the archived logs are corrupted and need to be restored from backup.
Valid Values Yes or no Default is no.
Command line option --reverse_resync_archive_log <value> or --rr_archive_log <value>

REVERSE_RESYNC_RECOVERY

Description Specifies method for recovering database during reverse resynchronization
Valid Values Auto, Manual or Auto_Until_SCN Default is Auto.

With AUTO recovery option, automatic database recovery until latest available archive logs will be attempted. If MANUAL recovery option is specified, database recovery will not be attempted and vxsfadm will just mount the database during reverse-resync-begin step. User can also specify AUTO_UNTIL_SCN option whereby he/she can recover database automatically until the point in time when snapshot was taken.

Command line option --reverse_resync_recovery <value> or --rr_recovery <value>

MAPPED_MOUNTS

Description Volume-to-mountpoint mapping provided by the user.
Valid Values <dg>:<vol>=<path>;<dg2> <vol2>=<path2>

Ex:testdg1:datavol=/tmp/so;

Command line option --mapped_mounts=<dg>:<vol>=<path>; <dg>:<vol>=<path> or --map <dg>:<vol>=path or --map <dg>:vol=path

PFILE

Description This paramater can be used to specify the pfile used by the primary database. If not specified the default pfile is assumed
Command line option --pfile=<filepath>

PFILE_MOD

Description This paramater specifies the file containing the modified pfile attributes to e used in the clone database.
Command line option --pfile_mod=<filepath>

EXAMPLES

1. Create a default configuration file

$ vxsfadm -s flashsnap -a oracle -o setdefaults --oracle_sid mydb --oracle_home /home/oracle/11gr2/app --flashsnap_name daily_snap -c dailyconfig

This will create a default configuration file with all the parameters and default values. If required, user can modify the parameters otherwise the file can be used as is.

Note: If ORACLE_SID and ORACLE_HOME parameters are exported in environment, there is no need to mention it on command line. In the following examples, we assume that ORACLE_SID and ORACLE_HOME parameters are available from the environment.

2. Validate database and system setup for flashsnap using default options

$ vxsfadm -s flashsnap -a oracle -o validate --flashsnap_name daily_snap

Use a configuration file for customizing snapshot configuration

$ vxsfadm -s flashsnap -a oracle -o validate -c dailyconfig

Validation for instant mode snapshot

$ vxsfadm -s flashsnap -a oracle -o validate --name daily_snap --instant

3. Create a snaphot

$ vxsfadm -s flashsnap -a oracle -o snap --flashsnap_name daily_snap

This step would break the required mirror from the primary volume(s). Create a new ddisk group with name having value of parameter snap_dg_prefix (by default SNAP_).

Note: All the parameters are read and stored at validation stage in repository, including mandatory parameters --oracle_sid and --flashsnap_name. In case user needs to change anything please change the configuration file and use -c option along with the above command.

$ vxsfadm -s flashsnap -a oracle -o snap -c dailyconfig

4. Mount snapshot

$ vxsfadm -s flashsnap -a oracle -o mount --flashsnap_name daily_snap

This command would mount the snapshot on the host running database instance. By default, snapshot volumes would be mounted in /tmp filesystem.

If user needs to specify alternate mount location, either provide CLONE_PATH on command line or from the config file as:

$ vxsfadm -s flashsnap -a oracle -o mount --flashsnap_name daily_snap --clone_path /cloneoracle

Make sure /cloneoracle directory exists and has appropriate permissions for oracle user.

If the configuration file exists, user can use

$ vxsfadm -s flashsnap -a oracle -o mount -c dailyconfig

5. Clone database on snapshot

$ vxsfadm -s flashsnap -a oracle -o clone --name daily_snap --clone_name newclone

If user has already specified the clone_name and clone_path in configuration file which was used during VALIDATE state, --clone_name is not required on command line.

$ vxsfadm -s flashsnap -a oracle -o clone --name daily_snap --clone_name newclone

If the configuration file is present

$ vxsfadm -s flashsnap -a oracle -o clone -c dailyconfig

6. Resynchronize snapshot mirrors back to primary volumes

$ vxsfadm -s flashsnap -a oracle -o resync --name daily_snap

This step would resynchronize all the mirrors which were broken during snapshot state back to primary volumes. After the resync operation is complete and mirrors are in SNAPDONE state (check vxprint output for the volumes). User can take fresh snapshot after resync operation.

7. Verify snapshot volumes using Reverse Resync preview session. Use manual database recovery option.

$ vxsfadm -s flashsnap -a oracle -o rrbegin --name daily_snap --rr_recovery manual

8. End reverse resync preview session. Go back to original data volumes.

$ vxsfadm -s flashsnap -a oracle -o rrabort --name daily_snap

9. Commit changes previewed during reverse resync preview session. Restore snapshot volumes onto primary volumes.

$ vxsfadm -s flashsnap -a oracle -o rrcommit --name daily_snap

Use this operation with caution. It will permanently restore the snapshot volumes onto data volumes.

ADVANCED OPERATIONS

vxsfadm provides a facility to user to directly perform end operation, without a need to perform intermediate states.

Clone a database on secondary host

$ vxsfadm -s flashsnap -a oracle -o clone --oracle_sid ’mydb’ --oracle_home ’/home/oracle’ --flashsnap_name ’dailysnap’ --secondary_host host2

Above command would create a clone database on host2. The sid of clone database would be dailyclone and would be mounted in /tmp directory. ORACLE_HOME and oracle name / uid of oracle user should be same on both the nodes. All the other parameters are assumed and assinged a default values as mentioned in parameter table.

If DBA needs to mount the clone database on secondary to some other location with different sid, user need to execute following command

$ vxsfadm - s flashsnap -a oracle -o clone --oracle_sid ’mydb’ --oracle_home ’/home/oracle’ -flashsnap_name ’dailysnap’ --secondary_host host2 --clone_path /home/newclonepath --clone_sid newsid

If user has a config file generated using setdefaults operation, change the appropriate parameters and execute the command as below

$ vxsfadm -s flashsnap -a oracle -o clone -c dailyconfig

SEE ALSO

vxsfadm (1M), vxsfadm-oracle(1M), vxsfadm-flashsnap (1M)

vxsfadm-checkpoint (1M), vxsfadm-filesnap (1M), vxsfadm-sos (1M) vxsfadm-oracle-checkpoint (1M), vxsfadm-oracle-filesnap (1M), vxsfadm-oracle-sos (1M)


Storage Foundation vxsfadm-oracle-flashsnap(1M)