rollback Command

Purpose

Reverts a JFS2 file system to a point-in-time snapshot.

Syntax

To rollback to an external snapshot

rollback [-s ] [ -v ] [-c] snappedFS snapshotObject

To rollback to an internal snapshot

rollback [ -v ] -n snapshotName snappedFS

Description

The rollback command is an interface to revert a JFS2 file system to a point-in-time snapshot. The snappedFS parameter must be unmounted before the rollback command is run and remains inaccessible for the duration of the command. Any snapshots that are taken after the specified snapshot (snapshotObject for external or snapshotName for internal) are removed. The associated logical volumes are also removed for external snapshots.

If the rollback command is interrupted for any reason, the snappedFS parameter remains inaccessible until the command is restarted and completes. A restarted rollback must target the same snapshotObject or snapshotName as the initial command.

Flags

Item Description
-c If specified, rollback continues even if read or write errors are observed when restoring the snappedFS from the snapshot. If you do not specify the -c flag, an error message is issued and the rollback stops. Run the fsck command in this case.
-n snapshotName Specifies the name of the internal snapshot to use for the rollback.
-s If specified, any logical volumes associated with snapshots removed by rollback will be preserved. The snapshots are still deleted.
-v This is the verbose option and causes a count of restored blocks to be printed as the rollback progresses.

Parameters

Item Description
snappedFS The JFS2 system to roll back.
snapshotObject The logical volume of the external snapshot to revert to.

Examples

To roll back the /home/janet/sb file system to the external snapshot on logical volume /dev/snapsb, enter:
rollback /home/janet/sb /dev/snapsb 

Location

Item Description
/usr/sbin/rollback Contains the rollback command.