Managing Snapshots with Database FlashSnap
With VERITAS Database FlashSnap, you can create a point-in-time copy of a database for backup and off-host processing. For more information, see Using Database FlashSnap for Backup and Off-Host Processing.
From the GUI, you can create snapshots of your database using snapplans. You can also resynchronize snapshots to your database and your database to a snapshot. The following sections describe the Database FlashSnap features within the GUI.
Database FlashSnap functionality is not supported on duplicated (cloned) databases.
Prerequisites
Creating a Snapplan
A snapplan specifies snapshot scenarios for an Oracle database (such as online, offline, and instant). The snapplan is used as a basis for creating a snapshot. You must either create or validate a snapplan before you can create the snapshot image.
Prerequisites
- You must be logged in as the Oracle database administrator.
- The disk group must be version 110 or higher.
- Persistent FastResync must be enabled.
- To set up your snapplan for online snapshots, the database must be in archive log mode.
Usage Notes
- Database FlashSnap functionality is not supported on cloned (duplicated) databases.
- The snapplan name is user-defined.
- Each entry in the snapplan is a line in parameter=argument format.
- See the dbed_vmsnapplan(1M) and dbed_vmchecksnap(1M) manual page for more information.
To create a snapplan
-
Click the Snapplans icon in the object tree. (You may need to expand the tree view to find the icon.)
-
Select one of the following methods to create a snapshot plan.
-
Confirm the Oracle SID. This is a read-only field.
-
Enter the full path of the snapplan file.
-
Enter the name of the secondary host.
-
Enter the snapshot plex tag.
-
Click Next to continue.
The Validate/Modify Snapplan screen is displayed with default values set.
-
If needed, modify any incorrect settings. Then, click Validate to ensure that the settings have been configured correctly.
Note
For more information regarding the snapplan parameters, see Creating and Working with Snapplans Using dbed_vmchecksnap.
-
At the confirmation prompt, click Yes to confirm that you want to validate the snapplan.
If the snapplan was successfully validated, you will receive a confirmation message.
-
To see the snapplan details, click the Show details checkbox. The snapplan details are displayed in the pop-up window.
When you have finished reviewing them, click OK. The following example is similar to what you should see:
PRIMARY_HOST is host1
SECONDARY_HOST is host2
The version of PRIMARY_DG-PRODdg is 110.
SNAPSHOT_DG is SNAP_PRODdg
SNAPSHOT_MODE is online
The database is running in archivelog mode.
ARCHIVELOG_DEST is /prod_db
SNAPSHOT_PLAN_FOR is database
SNAPSHOT_ARCHIVE_LOG is yes
ARCHIVELOG_DEST=/prod_db is mount on /dev/vx/dsk/PRODdg/ORACLE1.
Examining Oracle volume and disk layout for snapshot.
Volume ORACLE1 on PRODdg is ready for snapshot.
Original plex and DCO log for ORACLE1 is on PRODdg02.
Snapshot plex and DCO log for ORACLE1 is on PRODdg01.
Volume oracon on PRODdg is ready for snapshot.
Original plex and DCO log for oracon is on PRODdg02.
Snapshot plex and DCO log for oracon is on PRODdg01.
SNAP_PRODdg for snapshot will include: PRODdg01
ALLOW_REVERSE_RESYNC is yes
The snapplan sp3 has been created.
Validating or Modifying a Snapplan
Before creating a snapshot, it is necessary to validate your snapplan to make sure the information is correct and that the snapshot will succeed. Occasionally, you may also need to modify a snapplan. For example, you would need to modify your snapplan if you wanted to change the primary disk group that is included in the snapshot.
Prerequisites
- You must be logged in as the Oracle database administrator.
- A DCO log must be attached to the snapshot plex.
Usage Notes
- Each entry in the snapplan is a line in parameter=argument format.
To validate or modify a snapplan
-
Click a specific snapplan in the object tree. (You may need to expand the tree view to find the icon.)
-
Select one of the following methods to validate or modify a snapshot plan.
-
If incorrect, enter the path and file name of the snapplan in the Snapplan file field. Then, click Next to continue.
-
If you are modifying your snapplan, enter any new parameters that should be updated. You are not required to do anything if no changes are required.
Note
For more information regarding the snapplan parameters, see Creating and Working with Snapplans Using dbed_vmchecksnap.
-
Click Validate to check that the settings have been configured correctly.
-
At the confirmation prompt, click Yes to confirm that you want to validate the snapplan.
If the snapplan was successfully validated, you will receive a confirmation message.
-
To see the snapplan details, click the Show details checkbox. The snapplan details are displayed in the pop-up window.
When you have finished reviewing them, click OK. The following example is similar to what you should see:
PRIMARY_HOST is host1
SECONDARY_HOST is host2
The version of PRIMARY_DG-PRODdg is 110.
SNAPSHOT_DG is SNAP_PRODdg
SNAPSHOT_MODE is online
The database is running in archivelog mode.
ARCHIVELOG_DEST is /prod_db
SNAPSHOT_PLAN_FOR is database
SNAPSHOT_ARCHIVE_LOG is yes
ARCHIVELOG_DEST=/prod_db is mount on /dev/vx/dsk/PRODdg/ORACLE1.
Examining Oracle volume and disk layout for snapshot.
Volume ORACLE1 on PRODdg is ready for snapshot.
Original plex and DCO log for ORACLE1 is on PRODdg02.
Snapshot plex and DCO log for ORACLE1 is on PRODdg01.
Volume oracon on PRODdg is ready for snapshot.
Original plex and DCO log for oracon is on PRODdg02.
Snapshot plex and DCO log for oracon is on PRODdg01.
SNAP_PRODdg for snapshot will include: PRODdg01
ALLOW_REVERSE_RESYNC is yes
The snapplan sp3 has been created.
Removing a Snapplan
You may need to remove a snapplan that is no longer necessary. However, you cannot create a snapshot if you do not have a snapplan.
Prerequisites
- You must be logged in as the Oracle database administrator.
To remove a snapplan
-
Click the snapplan you want to remove in the object tree. (You may need to expand the tree view to find the icon.)
-
Select one of the following methods to remove the snapplan.
-
At the prompt, click Yes to continue with removing the snapplan.
If the snapplan was successfully removed, you will receive a confirmation message similar to the following:
Successfully removed snapplan: sp1
-
Click the Show details checkbox to view the actions taken. You should see information similar to the following:
The snapplan <filename> has been removed.
Click OK to continue.
Creating a Snapshot
After having created and validated a snapplan, you can create a snapshot of your database. You can use the snapshot as a database backup or as a test database to perform operations without affecting your production database.
Prerequisites
- You must have a validated snapplan before creating a snapshot image.
- You must be logged in as the Oracle database administrator.
Usage Notes
- See the dbed_vmsnap(1M) manual page for more information.
- If you are creating an offhost snapshot, perform these steps on the secondary host.
To create a snapshot
-
Click a snapplan in the object tree. (You may need to expand the tree view to find the icon.)
-
Select one of the following methods to create a snapshot.
-
Verify the snapplan location. (This is a read-only field.)
-
If you need to force the snapshot creation, click the Force snapshot creation checkbox.
Note
Force snapshot creation can be used after a snapshot operation has failed and the problem was fixed without using VERITAS Storage Foundation for Oracle commands. (That is, the volumes were synchronized without using VERITAS Storage Foundation for Oracle commands.) In this situation, the status of the snapplan will appear as unavailable for creating a snapshot. The Force snapshot creation option ignores the unavailable status, checks for the availability of volumes, and creates the snapshot after the volumes pass the availability check.
-
Click Finish to continue.
-
If the snapshot creation was successful, you will receive a confirmation message.
-
Click the Show details checkbox to view the actions taken. You should see information similar to the following:
dbed_vmsnap started at 2004-05-13 17:09:40
VxDBA repository is up to date.
The database is running in archivelog mode.
A snapshot of ORACLE_SID PROD is in DG SNAP_PRODdg.
Snapplan sp2 is used for the snapshot.
VxDBA repository volume is SNAP_ORACLE1.
If -r <relocate_path> is used in dbed_vmclonedb,
make sure <relocate_path> is created and owned by
Oracle DBA. Otherwise, the following mount points
need to be created and owned by Oracle DBA:
/prod_db.
/oracon.
dbed_vmsnap ended at 2003-05-13 17:10:29
Click OK to continue.
You can now use the snapshot as a database backup.
Note
You will need this information when you start your snapshot database.
Creating a Clone Database With a Snapshot
After having created a snapshot, you can use the snapshot to create a clone database. The cloned database can be used for decision-making and testing that cannot be done on your production database.
Prerequisites
- Make sure you have enough disk space to create a clone database on your system.
- You must have an existing snapshot.
To create a clone database with a snapshot
-
Click the Oracle icon in the object tree. (You may need to expand the tree view to find the icon.)
-
Select one of the following methods to start the snapshot database.
-
In the "connect as" section, enter the local path to Oracle home. Then, enter your Unix user name, password.
-
For the primary database, enter the Oracle SID information.
-
Select whether you are recovering the database or restarting the database by clicking the appropriate radio button.
Select Startup database if you are restarting a new snapshot database based on a snapshot. Select Restart database if you are restarting a snapshot database that has already been created.
-
For the snapshot database, enter the new Oracle SID, Snapplan file, VxDBA volume name, Snapshot disk group name, and Relocate path in the appropriate fields.
Note
To start an on-host snapshot database, the Relocate path is required. To start an off-host snapshot database, the VxDBA volume name field is required. You can obtain this information by viewing the details after you create a snapshot. If you did not retain the information from the snapshot creation, you can use the dbed_vmchecksnap command or use Viewlog via the GUI to retrieve the information. For more information, see Creating and Working with Snapplans Using dbed_vmchecksnap.
-
Click Start Database.
-
At the confirmation prompt, click Yes to confirm that you want to start the database.
If the snapshot database was successfully started, you will receive a confirmation message. Click OK to continue.
Resynchronizing a Snapshot to a Database
Resynchronizing a snapshot to a database will refresh the snapshot so that it contains the most recent changes made to your production database.
Prerequisites
- You must be logged in as the Oracle database administrator.
- You must shut down the clone database and unmount the file systems.
Usage Notes
- See the dbed_vmsnap(1M) manual page for more information.
To resynchronize a snapshot to a database
-
Click a snapplan, located under the Snapplans icon, in the object tree. (You may need to expand the tree view to find the icon.)
-
Select one of the following methods to resynchronize the snapshot.
- From the menu bar, select Snapplan > Resync Snapshot.
- Right click the snapplan to bring up a pop-up menu. Then click Resync Snapshot.
-
At the confirmation prompt, click OK to continue resynchronizing the snapshot to the database.
-
If the resynchronization was successful, you will receive a confirmation message. Click OK to continue.
-
Status information similar to the following example is displayed. Click OK when you have finished viewing the information.
dbed_vmsnap started at 2003-05-13 17:20:05
The option resync has been completed.
dbed_vmsnap ended at 2003-05-13 17:20:41
To see the details, click the Show details checkbox. The details are displayed in a pop-up window.
Resynchronizing a Database to a Snapshot
Resynchronizing your database to a snapshot, also known as reverse resynchronization, reverts your database to a snapshot. Use this option if your database becomes corrupted and you need to restore your database to a previous point-in-time.
Prerequisites
- You must be logged in as the Oracle primary database administrator.
- You must shut down the primary database and the clone database; also, unmount the file systems.
Usage Notes
- See the dbed_vmsnap(1M) manual page for more information.
To resynchronize a database to a snapshot
-
Click a snapplan, located under the Snapplans icon, in the object tree. (You may need to expand the tree view to find the icon.)
-
Select one of the following methods to resynchronize the database to a snapshot.
-
Verify the Oracle SID and snapplan information. These are read-only fields.
-
Click the Begin button, then click Finish to start the reverse resynchronization process. To view details, click the Show details checkbox. The details are displayed in a pop-up window.
-
At the confirmation prompt, click Yes to continue.
The Begin option performs the following actions:
- Imports the disk group that was deported from the secondary host and joins it back to the original disk group.
- Mounts the snapshot volumes.
- Mounts the file systems that are configured for the primary database.
- Brings up the database snapshot image as the primary database.
Note
The primary database must be offline to perform this action.
-
If the begin action was successful, you will receive a confirmation message. Click Show details to see the actions completed. When you are through, click OK to continue.
-
Again, click the snapplan on which you want to perform the reverse resynchronization.
-
Select one of the following methods to resynchronize the database to a snapshot.
-
Click the Commit button, then click Finish to commit the reverse resynchronization process.
-
At the confirmation prompt, click Yes to continue.
The Commit option performs the following actions:
- Commits the reverse resynchronization changes.
- Resynchronizes the original volume from the data in the snapshot and then discards the content of the original database.
Note
This action cannot be undone.
-
If the commit action was successful, you will receive a confirmation message. Click Show details to see the actions completed. When you are through, click OK to continue.
Aborting the Reverse Resychronization Operation
Occasionally, you may need to stop the reverse resynchronization process after you have begun. You can only abort the reverse resynchronization process after you have completed the Begin operation and before performing a Commit operation.
To abort the reverse resynchronization operation
-
Click the snapplan for which the reverse resynchronization was begun.
-
Select one of the following methods to resynchronize the database to a snapshot.
-
Verify the Oracle SID and snapplan information. These are read-only fields.
-
Click the Abort button, then click Finish to abort the reverse resynchronization process.
-
At the confirmation prompt, click Yes to continue.
The Abort option performs the following actions:
- Unmounts the snapshot volumes.
- Mounts the original volumes back with the file systems that are configured to use the volume.
Note
This action can only be performed after a "begin" action has been completed and cannot be used after a reverse resynchronization has been committed.
-
If the abort action was successful, you will receive a confirmation message. Click Show details to see the actions completed. When you are through, click OK to continue.
Viewing the Snapplan Log
The Snapplan Log displays information about the Snapplan, disk group, snapshot Plex tag. It also displays the VxDBA volume name and the snapshot status.
To view a Snapplan Log
-
In the object tree, click the snapplan whose log you wish to see. (You may need to expand the tree view to find the icon.)
-
Select one of the following methods to view the log of a snapplan.
-
Click OK to continue.
|