Recovering one or more files from an online external JFS2 snapshot

You can replace a corrupted file if you have an accurate copy in an online external JFS2 snapshot.

Use the following procedure to recover one or more files from an online external JFS2 snapshot image.

For this example, assume that /home/aaa/myfile is a corrupted file in the /home file system.

  1. Mount the snapshot with a command similar to the following:
    mount -v jfs2 -o snapshot /dev/mysnaplv /tmp/mysnap
  2. Change to the directory that contains the snapshot with a command similar to the following:
    cd /tmp/mysnap
  3. Copy the accurate file from the snapshot to overwrite the corrupted file with a command similar to the following:
    cp aaa/myfile /home/aaa/myfile
    The previous example copies only the file named myfile. If you want to copy all the files from the snapshot to the aaa directory, use a command similar to the following:
    cp -R aaa /home/aaa
    For more examples of replacing corrupted files with snapshot images, see the cp or cpio command descriptions in Commands Reference, Volume 1.