The db2ed_vmsnap command creates a snapshot of a DB2 database by splitting the mirror volumes used by the database into a snapshot database. You can use the snapshot image on either the same host as the database or on a secondary host provided storage is shared by the two hosts.
The snapshot image created by db2ed_vmsnap is a frozen image of a DB2 database's containers.
Before creating a snapshot, make the sure the following conditions are met:
The snapshot volumes now represent a consistent backup copy of the database. You can back up the database by copying the snapshot volumes to tape or other backup media.
See Backing up the database from snapshot volumes (db2ed_vmclonedb).
You can also create another DB2 database for decision-support purposes.
See Cloning a database (db2ed_vmclonedb).
In this example, a snapshot image of the database, PROD, is created for a single-host configuration. In this case, the SECONDARY_HOST parameter is set the same as the PRIMARY_HOST parameter in the snapplan.
$ /opt/VRTS/bin/db2ed_vmsnap -D PROD -f snap1 -o snapshot
db2ed_vmsnap started at 2006-03-10 13:10:54 DB20000I The SET WRITE command completed successfully. DB20000I The SET WRITE command completed successfully. A snapshot of DB2DATABASE PROD is in DG SNAP_PRODdg. Snapplan snap1 is used for the snapshot. DB2 server (server_name) is kagu If -r <relocate_path> is used in db2ed_vmclonedb, make sure <relocate_path> is created and owned by DB2 Instance Owner. Otherwise, the following mount points need to be created and owned by DB2 Instance Owner: /PROD_HOME. /PROD_TBS. db2ed_vmsnap ended at 2006-03-10 13:11:17
In this example, a snapshot image of the primary database, PROD, is created for a two-host configuration. In this case, the SECONDARY_HOST parameter specifies a different host name than the PRIMARY_HOST parameter in the snapplan.
$ /opt/VRTS/bin/db2ed_vmsnap -D PROD -f snap2 -o snapshot
db2ed_vmsnap started at 2006-03-10 13:13:53 DB20000I The SET WRITE command completed successfully. DB20000I The SET WRITE command completed successfully. A snapshot of DB2DATABASE PROD is in DG SNAP_PRODdg. Snapplan snap2 is used for the snapshot. DB2 server (server_name) is kagu If -r <relocate_path> is used in db2ed_vmclonedb, make sure <relocate_path> is created and owned by DB2 Instance Owner. Otherwise, the following mount points need to be created and owned by DB2 Instance Owner: /PROD_HOME. /PROD_TBS. db2ed_vmsnap ended at 2006-03-10 13:14:16