To restore a Snapshot copy, determine which storage entity you want to restore, specify the name of the Snapshot copy, and so on.
The following table gives the information you need to supply when you use the snapdrive snap restore command.
|Decide the type of storage entity that you wish to restore and enter that entity’s name with the appropriate argument.
|LUN (-lun file_spec)||name of the LUN. You must include the name of the storage system, volume, and LUN.|
Disk group (-dg file_spec c) or volume group (-vg file_spec )
|name of the disk or volume group|
|File system (-fs file_spec )||name of the file system|
|File (-file file_spec )||name of the NFS file|
|Host volume (-hostvol file_spec ) or logical volume (-lvol file_spec )||name of the host or logical volume. You must supply both the requested volume and the disk group containing it; for example, - hostvol dg3/acct_volume.|
|Specify the name for the Snapshot copy. If any of the file_spec arguments you supply at the command prompt currently exist on the local host, you can use a short form of the Snapshot copy name.
If none of the file_spec arguments exist on the host, you must use a long form of the Snapshot copy name where you enter the storage system name, volume, and Snapshot copy name. If you use a long name for the Snapshot copy and the path name does not match the storage system and/or storage volume information at the command prompt, SnapDrive for UNIX fails. The following is an example of a long Snapshot copy name: big_filer:/vol/account_vol:snap_20031115
Sometimes, the value supplied with the file_spec argument might not exist on the host. For example, if you had unmounted a file system or removed a disk group by exporting, deporting, or destroying, that file system or disk group could still be a value for the file_spec argument. It would, however, be considered a non-existent value. SnapDrive for UNIX can restore Snapshot copies for such a non-existent file_spec, but you must use the long Snapshot copy name.
When you restore Snapshot copies that span multiple storage systems and volumes, and contain a nonexistent file_spec argument, SnapDrive for UNIX permits an inconsistency in the command line. It does not allow for existing file_spec arguments. If you want to restore only one storage entity from a multiple storage system Snapshot copy, the Snapshot copy you specify does not need to be on the same storage system as the storage system containing the storage entity.
The short form of the same Snapshot copy name would omit the storage system and storage system volume name, so it would appear as: snap_20031115
|Snapshot copy name (-snapname)||snap_name|
|It can be either a short name, such as mysnap1, or a long name that includes the storage system name, volume, and Snapshot copy name.
Generally, NetApp recommends that you use the short name. If the file_spec argument is non-existent: that is, it no longer exists on the host; see the explanation of the file_spec argument. Then you must use the long name for the Snapshot copy.
|-reserve | -noreserve|
Optional: If you want SnapDrive for UNIX to create a space reservation when you restore the Snapshot copy.
|Optional: Decide if you want to overwrite an existing Snapshot copy. Without this option, this operation halts if you supply the name of an existing Snapshot copy. When you supply this option and specify the name of an existing Snapshot copy, it prompts you to confirm that you want to overwrite the Snapshot copy. To prevent SnapDrive for UNIX from displaying the prompt, include the -noprompt option also. (You must always include the -force option if you want to use the -noprompt option.)
You must include the -force option at the command prompt if you attempt to restore a disk group where the configuration has changed since the last Snapshot copy. For example, if you changed the way data is striped on the disks since you took a Snapshot copy, you would need to include the -force option. Without the -force option, this operation fails. This option asks you to confirm that you want to continue the operation unless you include the -noprompt option with it.
Note: If you added or deleted a LUN, the restore operation fails, even if you include the -force option.
Optional: If you are creating a file system, you can specify the following options: