Information Technology Reference
In-Depth Information
UFS Snapshots
The
fssnap(1M)
command is used to create a read-only static copy (a snap-
shot) of a mounted UFS file system. This allows file systems to be backed up
without requiring that the file systems be unmounted or the system taken
down to single-user mode.
To create a snapshot of a file system, a mount point (or special device name)
of the file system and a
backing store
, (used to store temporary data), must be
specified. The type of file system (always
ufs
) must also be specified using
the
-F
command-line argument. The
fssnap
command outputs the special
block device created for the snapshot, as shown in the following code:
# fssnap -F ufs -o backing-store=/var/tmp /usr
/dev/fssnap/0
#
To display information about all snapshots, specify the
-i
command-line
argument. To display information about a specific snapshot, specify the file
system mount point or special device name of the file system after the
-i
command-line argument, as shown in the following:
# fssnap -F ufs -i /usr
Snapshot number : 0
Block Device : /dev/fssnap/0
Raw Device : /dev/rfssnap/0
Mount point : /usr
Device state : active
Backing store path : /scratch/snapshot2 <UNLINKED>
Backing store size : 232 KB
Maximum backing store size : Unlimited
Snapshot create time : Sat Aug 03 10:55:11 2002
Copy-on-write granularity : 32 KB
#
To back up a mounted file system using the snapshot, specify the raw device
name of the snapshot (see the
fssnap -i
output) as a command-line argu-
ment of the
ufsdump
command:
# ufsdump 1uf /dev/rmt0 /dev/rfssnap/0
To delete a snapshot that is no longer needed, specify the
-d
command-line
argument followed by the mount point or special device name of the file
system:
# fssnap -f UFS -d /usr