Go to main content
Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.0

Exit Print View

Updated: July 2017
 
 

Restoring a LOCAL Key (CLI)

To restore a LOCAL key that was deleted, create a new LOCAL key with the same keyname and value as the deleted key. You must have first recorded, or backed up, this information before the key was deleted. The backup procedure is described in Backing Up a LOCAL Key (CLI). Although deleting a LOCAL key renders shares inaccessible, the shares can be made accessible again by recreating the LOCAL key.

For information about restoring keys stored in the OKM keystore, refer to the Oracle Key Manager documentation on the Oracle Technology Network (http://www.oracle.com/technetwork/indexes/documentation/index.html).

Use the following procedure to restore a backed up LOCAL key.


Note -  If the keyname is in use with a different key value for existing shares, change the key used for those shares before restoring the original LOCAL key. For more information, see Changing a Share Encryption Key (CLI).
  1. Retrieve the keyname and value for the LOCAL key from your backup location.
  2. Create a key in the LOCAL keystore:
    hostname:shares encryption local keys> create
  3. Name the key based on the backup:
    hostname:shares encryption local key-005 (uncommitted)> set keyname=Mykey
         keyname = Mykey (uncommitted)
  4. Set the key value based on the backup:
    hostname:shares encryption local key-005 (uncommitted)> set key=d6a5b801ffb93fcb19ef70a11d662d8092f243c5d4ccd0cd34264b15dd0b7739
         key = d6a5b801ffb93fcb19ef70a11d662d8092f243c5d4ccd0cd34264b15dd0b7739 (uncommitted)
  5. Save the key:
    hostname:shares encryption local key-005 (uncommitted)> commit

    If the keyname is used with existing shares, you will be alerted:

    Existing shares reference the key Mykey from the LOCAL keystore. Are you sure? (Y/N)

    To overwrite the key value in the existing shares, type Y. Type N to not add the new key. You can then change the key used for those shares before repeating this procedure and restoring the original key. For more information, see Changing a Share Encryption Key (CLI).

Related Topics