Skip to main content
Snapdrive for Unix

Restoring a Snapshot copy

Contributors

You can restore a Snapshot copy by using the snapdrive snap restore command. The restore operation can take several minutes, depending on the type, and amount of data being restored.

Steps
  1. Enter the following command to restore a Snapshot copy:

    snapdrive snap restore -snapname snap_name {-lun |-dg |-fs | - hostvol |-file }_file_spec_ [file_spec…​] [{ -lun | -dg | -fs |-hostvol |-file } file_spec [file_spec …​]…​] [-force [-noprompt]] [-mntopts options]][{-reserve |-noreserve}] [-devicetype {shared | dedicated}]

SnapDrive for UNIX replaces the contents of the LUNs you specify in the snapdrive snap restore command line with the contents of the LUNs in the Snapshot copy you specify. This operation can take several minutes. When the operation is complete, SnapDrive for UNIX displays a message similar to the following: snap restore <filespec list> succeeded

In the following example, file system 1 (fs1) resides on storage system1, and file system 2 (fs2) resides on storage system1 and also on storage system 2, which is the partner storage system. File system 3 (fs3) resides on storage system1, partner storage system 2, and storage system3, which is not part of the HA pair. An additional file system, fs4, resides entirely on storage system 4.

The following command creates a Snapshot copy of fs1, fs2, fs3, and, fs4:

# snapdrive snap create -fs /mnt/fs1 /mnt/fs2 /mnt/fs3 /mnt/fs4
-snapname fs_all_snap

The next command restores fs1 and fs2 on the destination storage system. Both fs1 and fs2 reside on a HA pair, so you can restore them with one command:

# snapdrive snap restore -fs /mnt/fs1 /mt/fs2 -snapname fs_all_snap

The following command restores fs4:

snapdrive snap restore -fs /mnt/fs4 -snapname fs_all_snap

SnapDrive for UNIX cannot restore fs3 on the destination storage system, because this file system resides on storage system1, storage system 2, and storage system 3.