Recovering one or more files from an online internal JFS2 snapshot

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

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

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

  1. Change to the directory that contains the snapshot with a command similar to the following:
    cd /home/.snapshot/mysnap
  2. 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 of the files from the snapshot to the aaa directory, use a command similar to the following:
    cp -R aaa /home/aaa