You create a snapshot file system by using the -o snapof= option of the mount command. The -o snapsize= option may also be required if the device you are mounting does not identify the device size in its disk label, or if you want a size smaller than the entire device.
You must make the snapshot file system large enough to hold any blocks on the snapped file system that may be written to while the snapshot file system exists. If a snapshot runs out of blocks to hold copied data, the snapshot is disabled and further attempts to access the snapshot file system fail.
During periods of low activity (such as nights and weekends), a snapshot typically requires about two to six percent of the blocks of the snapped file system. During a period of high activity, the snapshot of a typical file system may require 15 percent of the blocks of the snapped file system. Most file systems do not turn over 15 percent of data in a single day. These approximate percentages tend to be lower for larger file systems and higher for smaller file systems. You can allocate blocks to a snapshot based on characteristics such as file system usage and duration of backups.
In the following examples, the vxdump utility is used to ascertain whether
/dev/rdsk/fsvol/vol1 is a snapshot mounted as
/backup/home and does the appropriate work to get the snapshot data through the mount point.
These are typical examples of making a backup of a 300,000 block file system named
/home using a snapshot file system on a Volume Manager volume with a snapshot mount point of
Example of creating a backup using a snapshop file system
# mount -t vxfs -o snapof=/home,snapsize=100000 \ /dev/vx/dsk/fsvol/vol1 /backup/home # cd /backup # find home -ctime -7 -depth -print | cpio -oc > /dev/st1 # umount /backup/home
/dev/vx/rdsk/fsvol/vol1 and collect those files that have changed in the current directory:
# vxdump 3f - /dev/vx/rdsk/fsvol/vol1 | vxrestore -xf -
/home, which exists on disk
/dev/vx/rdsk/fsvol/vol1, and use dd to control blocking of output onto tape device using vxdump:
# mount -t vxfs -o snapof=/home,snapsize=100000 \ /dev/vx/dsk/fsvol/vol1 /backup/home # vxdump f - /dev/vx/rdsk/fsvol/vol1 | dd bs=128k > /dev/st1