[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5

snapshot Command

Purpose

Modify, create or view properties of snapshots.

Syntax

snapshot { -o snapfrom=snappedFS -o size=Size | {-d [-s] | -q [-cfieldSeparator] | -o snapfrom=snappedFS | -o size=Size} Object}

Description

Provides an interface to JFS2 snapshots.

Flags

-d Deletes the snapshot and the logical volume containing the snapshot, along with any prior snapshots. The Object specified is a snapshot storage object.
-s Retains the specified logical volume for the specified snapshot when the snapshot is deleted.
-q Displays information about the specified snapshot if the specified Object is a snapshot storage object.

Displays the file system the snapshot belongs to, the time of when the snapshot was taken, the size of the snapshot storage object and the remaining free space. If the Object specified is a snappedFS, display information about all snapshots for the snappedFS. Show each of the snapshots and their storage object along with the time when the snapshot was taken.

Displays the size of the snapshot storage objects and the remaining free space.

-cfieldSeparator Specifies the output from the snapshot query should be displayed in colon format. The fieldSeparator is the character to use to separate the fields of the display.
-o snapfrom=snappedFS Creates a snapshot of the specified snappedFS. If the Object is not specified, a new logical volume will be created and used for the snapshot. If the specified Object is a logical volume, it must already exist and it must be in the same volume group as the snappedFS. If the Object specified is already in use as a snapshot or a file system known to the /etc/filesystems file, the command issues an error message and fails.
-o size=Size Specifies the size of a new logical volume if specified along with the -o snapfrom=snappedFS flag. Otherwise, this flag increases the size of the snapshot specified by the Object field to the value of Size. This flag is Ignored if any other flag is given. If Size is followed by an M the value is treated as megabytes. If Size is followed by a G the value is treated as gigabytes. If neither M or G are used, the value is treated as 512-byte blocks.

Parameters

Object Use depends on other flags specified, see flag description for interpretation of Object. This may be a device or a file system.

Examples

  1. To create a snapshot for the /home/janet/sb file system on the /dev/snapsb logical volume, type the following:
    snapshot -o snapfrom=/home/janet/sb /dev/snapsb
    This command creates a snapshot for the /home/janet/sb file system on the /dev/snapsb logical volume, which already exists.
  2. To create a snapshot for the /home/janet/sb file system, type the following:
     snapshot -o snapfrom=/home/janet/sb -o size=16M
    This command creates a 16-megabyte logical volume and creates a snapshot for the /home/janet/sb file system on the newly created logical volume.
  3. To view information about all the snapshots for the /home/janet/sb file system, type the following:
    snapshot -q /home/janet/sb
    This command displays each snapshot for the /home/janet/sb file system along with the time when the snapshot was taken, the size of the snapshot storage object, and the remaining free space.
  4. To increase the size of the snapshot on the /dev/snapsb device, type the following:
    snapshot -o size=64M /dev/snapsb
    This command increases the /dev/snapsb device to 64 megabytes along with the snapshot contained on the device.
  5. To delete the snapshot on the /dev/snapsbdevice, type the following:
    snapshot -d /dev/snapsb
    This command deletes the snapshot contained on the /dev/snapsb device and removes the /dev/snapsb logical volume .

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]