Making an online backup of a JFS

Making an online backup of a mounted journaled file system (JFS) or enhanced journaled file system (JFS2) creates a static image of the logical volume that contains the file system.

To make an online backup of a mounted JFS, the logical volume that the file system resides on and the logical volume that its log resides on must be mirrored.

Note: Because the file writes are asynchronous, the split-off copy might not contain all data that was written immediately before the split. Any modifications that begin after the split begins might not be present in the backup copy. Therefore, it is recommended that file system activity be minimal while the split is taking place.

The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.

To split off a mirrored copy of the /home/xyz file system to a new mount point named /jfsstaticcopy, type the following:

chfs -a splitcopy=/jfsstaticcopy /home/xyz
You can control which mirrored copy is used as the backup by using the copy attribute. The second mirrored copy is the default if a copy is not specified by the user. For example:
 chfs -a splitcopy=/jfsstaticcopy -a copy=1 /home/xyz

At this point, a read-only copy of the file system is available in /jfsstaticcopy. Any changes made to the original file system after the copy is split off are not reflected in the backup copy.

To reintegrate the JFS split image as a mirrored copy at the /testcopy mount point, use the following command:
 rmfs /testcopy

The rmfs command removes the file system copy from its split-off state and allows it to be reintegrated as a mirrored copy.