backsnap Command

Purpose

Provides an interface to create a snapshot for a JFS2 file system and perform a backup of the snapshot.

Syntax

backsnap [ -R ] { -m MountPoint -s size=Size | -n snapshotName } [ BackupOptions ] FileSystem

Description

Provides an interface to create a snapshot for a JFS2 file system and perform a backup of the snapshot. The restore command can be used to retrieve the backup.

Flags

Item Description
-m MountPoint Specifies the path of where the external snapshot created should be mounted.
-R Specifies that the snapshot created by this command will be removed when the backup completes.
-s size=Size Specifies the size to create the new logical volume for the external snapshot.

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. Otherwise, the value is treated as 512-byte blocks.

-n snapshotName Specifies the name of the internal snapshot to be created. The JFS2 file system must be enabled to use internal snapshots.

Parameters

Item Description
BackupOptions Any other options are passed to the backup command when the backup of the snapshot is performed. Minimally, it is required to specify the type of backup desired.

For backup by name, the -i option must be specified along with the device for the backup.

For backup by inode, the level option, -[0-9], must be specified along with the device for the backup.

Use the restore command to retrieve the backup.

FileSystem Specifies the JFS2 file system to create a snapshot of and backup.

Exit Status

0
The command completed successfully.
>0
An error occurred.

Examples

  1. To create a snapshot for the /home/janet/sb file system and perform a backup on the snapshot by name, enter:
     backsnap -m /tmp/snapshot/janetsb -s size=16M -i -f/dev/rmt0 /home/janet/sb 
    This command creates a logical volume of size 16 megabytes and then creates a snapshot for the /home/janet/sb file system on the newly created logical volume. It then mounts the snapshot on /tmp/snapshot/janetsb and backs up the files and directories in that file system by name to the /dev/rmt0 device.
  2. To create a snapshot for the /home/janet/sb file system and perform a backup on the snapshot by inode, enter:
     backsnap -R -m /tmp/snapshot/janetsb -s size=16M -0 -f /dev/rmt0 /home/janet/sb 
    This command creates a logical volume of size 16 megabytes and then creates a snapshot for the /home/janet/sb file system on the newly created logical volume. It then mounts the snapshot on /tmp/snapshot/janetsb and backs up the data in the snapshot by inode to the /dev/rmt0 device. After the backup completes, the snapshot is deleted.

Files

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