You are here: Administration & Maintenance Manual > HSM Administration > Backup & Restore HSM and Partition Contents > Partition Backup > Backup your HSM Partition Locally

Administration & Maintenance - Backup & Restore

Backup your HSM Partition Locally

The options to backup a Partition on your Luna appliance are:

a) local backup, co-located

b) local backup, distant

b) remote backup.

 

"Local backup co-located" means that the Luna Remote Backup Device is co-located and physically connected to the Luna SA appliance whose contents are to be backed up. You would most likely be using a laptop near the Luna SA appliance to run your admin session (either by network SSH session or by a local serial connection), and would use locally connected Luna PEDs to provide the necessary authentication.

"Local backup distant" means that the Luna Remote Backup Device is physically connected to the laptop or workstation that you are using to administer the backup operation (this might or might not be the same laptop that you use for other Luna SA administration tasks), while the Luna SA appliance whose contents are to be backed up is located at some distance from your admin station. You would have established a network client relationship between the Luna SA appliance and your admin computer (in addition to any SSH admin connection you might be using for other purposes. Your Luna SA partitions must see the backup admin computer as a client, so that your admin computer can see the Luna SA partitions as slots.

"Remote" backup means that the Luna SA appliance, and the computer that acts as a client and that sees the Luna SA as a slot, are at remote locations from where you and your admin laptop/workstation reside. In this situation, your admin laptop has no NTLS and no client relationship with Luna SA partitions. Instead, your admin workstation visits the distant client/host computer and instructs that computer to perform backup and restore operations with the Luna SA. The Luna Remote Backup HSM would be attached to your admin laptop/workstation, and must run RBS. The client/host computer in the middle sees both the Luna SA partitions and the Luna Remote Backu HSM as slots in its lunacm session. This scenario is treated separately at "Backup your HSM Partition Remotely" and "Restore Your HSM Partition Remotely".

Local Backup - co-located

You will need -

Quantity Description
1 Luna SA 5.x

1 Windows 32-bit computer with Luna SA 5.x 32-bit client software installed

1 Luna Remote Backup HSM**

1 Set of PED Keys imprinted for the source HSM and partitions

1 Luna PED2 ( with f/w 2.4.0-3 or later)*

1 Luna PED 2 cable for Luna Remote Backup HSM


* The Luna PED2 can be either a local-only PED or. a Luna PED2 with Remote capability, but set to local mode for this operation.

** The backup HSM is called the "Luna Remote Backup HSM" only because it is capable of remote operation if needed. It works fine when connected locally to the source HSM, as in this case.

Assumptions

 

 

  1. Connect all the components as follows–


  2. From Using To
    Workstation either
    serial cable
    or
    network (SSH over Ethernet) link
    Luna SA appliance
    Luna SA USB Luna Remote Backup HSM
    Luna SA Micro-D to Micro-D (local PED) cable Luna PED (make this PED connection at the start,seat the connectors fully at both ends, but leave the securing thumbscrews loose at the HSM end)

    Luna Remote Backup HSM Micro-D to Micro-D (local PED) cable Luna PED (move the unsecured cable end to this HSM later, when prompted)
  3. As soon as the PED is connected to a powered HSM it starts up and defaults to Local mode,
    "Awaiting command...".
  4. Open an administrative connection (SSH) to the Luna SA appliance.
    login as: admin
    admin@192.20.10.202's password:
    Last login: Tue Feb 28 16:03:46 2012 from 192.16.153.111

    Luna SA 5.1.0-25 Command Line Shell - Copyright (c) 2001-2011 SafeNet, Inc. All rights reserved.
    [myluna] lunash:>


  5. Optionally, view some information about connected HSMs:
    [myluna] lunash:>token backup list

    Token Details:
    ============
    Token Label:     G5backup2
    Slot:           6
    Serial #:       7000179
    Firmware:       6.0.8
    Hardware Model: Luna G5

    Token Details:
    ============
    Token Label:    G5backup1
    Slot:           7
    Serial #:       700010
    Firmware:       6.0.8
    Hardware Model: Luna G5

    Command Result : 0 (Success)
    [myluna] lunash:>

    lunash:> token backup show -serial 700179
    Token Details:  
    ============
    Token Label:                     G5backup2  
    Serial #:                        700179  
    Firmware:                        6.0.8  
    Hardware Model:                  Luna G5  
    Authentication Method:           PED keys  
    Token Admin login status:        Logged In  
    Token Admin login attempts left: 3 before Token zeroization!

    Partition Information:  
    ======================
    Partitions licensed on token:     20  
    Partitions created on token:      1
    ----------------------

    There are no partitions.

    Token Storage Information:  
    ==========================

    Maximum Token Storage Space (Bytes): 16252928  
    Space In Use (Bytes):                             0  
    Free Space Left (Bytes):             16252928

    License Information:  
    ====================

    621010355-000 621-010355-000 G5 Backup Device Base  
    621000005-001 621-000005-001 Backup Device Partitions 20  
    621000006-001 621-000006-001 Backup Device Storage 15.5 MB  
    621000007-001 621-000007-001 Backup Device Store MTK Split Externally  
    621000008-001 621-000008-001 Backup Device Remote Ped Enable

    Command result : 0 (Success)  
    lunash:>

  6. Backup a specified partition on your Luna SA with the command  
    [myluna] lunash:>par backup -s 7000179 -par p1 -tokenPar bck1
    Warning: The Backup Token has firmware version 6.0.8, which is older
    than that of the HSM (6.2.1). Usually, SafeNet recommends
    that the Backup Token and HSM have the same firmware revision.
    Please consult the Customer Release Notes for this release, if
    any, for guidance on whether you should upgrade this Backup
    Token's firmware.

    Type 'proceed' to continue the backup, or 'quit'
    to abort this operation.
    > proceed
    Please enter the password for the HSM partition:
    > *******

    Warning: You will need to attach Luna PED to the Luna Backup HSM
             to complete this operation.
             You may use the same Luna PED that you used for Luna SA.

    Please hit <enter> when you are ready to proceed.

    Luna PED operation required to login to token - use token Security Officer (blue) PED key.

    Luna PED operation required to create a partition - use User or Partition Owner (black) PED key.

    Luna PED operation required to login to user on token - use User or Partition Owner (black) PED key.

    Luna PED operation required to generate cloning domain on the partition - use Domain (red) PED key.

    Object "1-User DES Key1" (handle 17) cloned to handle 11 on target
    Object "1-User DES Key2" (handle 18) cloned to handle 12 on target
    Object "1-User Public RSA Key1-512" (handle 19) cloned to handle 13 on target
    Object "1-User Private RSA Key1-512" (handle 20) cloned to handle 14 on target
    Object "1-User Public RSA Key2-512" (handle 21) cloned to handle 15 on target
    Object "1-User Private RSA Key2-512" (handle 22) cloned to handle 16 on target
    Object "1-User Public RSA Key3-512" (handle 23) cloned to handle 17 on target
    Object "1-User Private RSA Key3-512" (handle 24) cloned to handle 18 on target
    Object "1-User Public RSA Key4-512" (handle 25) cloned to handle 19 on target
    Object "1-User Private RSA Key4-512" (handle 26) cloned to handle 20 on target
    Object "1-User Public RSA Key5-512" (handle 27) cloned to handle 21 on target
    Object "1-User Private RSA Key5-512" (handle 28) cloned to handle 22 on target
    Object "1-User Public RSA Key1-1024" (handle 29) cloned to handle 23 on target
    Object "1-User Private RSA Key1-1024" (handle 30) cloned to handle 24 on target
    Object "1-User Public RSA Key2-1024" (handle 31) cloned to handle 25 on target
    Object "1-User Private RSA Key2-1024" (handle 32) cloned to handle 26 on target
    Object "1-User Public RSA Key3-1024" (handle 33) cloned to handle 27 on target
    Object "1-User Private RSA Key3-1024" (handle 34) cloned to handle 28 on target
    Object "1-User Public RSA Key4-1024" (handle 35) cloned to handle 29 on target
    Object "1-User Private RSA Key4-1024" (handle 36) cloned to handle 30 on target
    Object "1-User Public RSA Key5-1024" (handle 37) cloned to handle 31 on target
    Object "1-User Private RSA Key5-1024" (handle 38) cloned to handle 32 on target
    Object "1-User Public RSA Key1-2048" (handle 39) cloned to handle 33 on target
    Object "1-User Private RSA Key1-2048" (handle 40) cloned to handle 34 on target
    Object "1-User Public RSA Key2-2048" (handle 43) cloned to handle 37 on target
    Object "1-User Private RSA Key2-2048" (handle 44) cloned to handle 38 on target
    Object "1-User Public RSA Key3-2048" (handle 47) cloned to handle 41 on target
    Object "1-User Private RSA Key3-2048" (handle 48) cloned to handle 42 on target
    Object "1-User Public RSA Key4-2048" (handle 51) cloned to handle 45 on target
    Object "1-User Private RSA Key4-2048" (handle 52) cloned to handle 46 on target
    |
    |[snip]
    |
    Object "1-User DES Key5" (handle 111) cloned to handle 105 on target
    Object "1-User DES3 Key1" (handle 112) cloned to handle 106 on target
    Object "1-User DES3 Key2" (handle 113) cloned to handle 107 on target
    Object "1-User DES3 Key3" (handle 114) cloned to handle 108 on target
    Object "1-User DES3 Key4" (handle 115) cloned to handle 109 on target
    Object "1-User DES3 Key5" (handle 116) cloned to handle 110 on target
    Object "1-User AES Key1" (handle 117) cloned to handle 111 on target
    Object "1-User AES Key2" (handle 118) cloned to handle 112 on target
    Object "1-User AES Key3" (handle 119) cloned to handle 113 on target
    Object "1-User AES Key4" (handle 120) cloned to handle 114 on target
    Object "1-User AES Key5" (handle 121) cloned to handle 115 on target
    Object "1-User ARIA Key1" (handle 122) cloned to handle 116 on target
    Object "1-User ARIA Key2" (handle 123) cloned to handle 117 on target
    Object "1-User ARIA Key3" (handle 124) cloned to handle 118 on target
    Object "1-User ARIA Key4" (handle 125) cloned to handle 119 on target
    Object "1-User ARIA Key5" (handle 126) cloned to handle 120 on target
    'partition backup' successful.

    Command Result : 0 (Success)
    [myluna] lunash:>


    Provide the PED Key as prompted.
  7. Optionally, view some information about the backup HSM, to see how it has changed:

    lunash:> token backup show -serial 667788
    Token Details:  
    ============
    Token Label:                      G5backup2  
    Serial #:                                                   700179  
    Firmware:                          6.0.8  
    Hardware Model:                    Luna G5  
    Authentication Method:             PED keys  
    Token Admin login status:          Logged In  
    Token Admin login attempts left:   3 before Token zeroization!

    Partition Information:  
    ======================
    Partitions licensed on token:     20  
    Partitions created on token:        0
    ----------------------
    Partition: 7000179008,         Name: bck1.

    Token Storage Information:  
    ==========================

    Maximum Token Storage Space (Bytes): 16252928  
    Space In Use (Bytes):                    43616  
    Free Space Left (Bytes):             16209312  

    License Information:  
    ====================

    621010355-000 621-010355-000 G5 Backup Device Base  
    621000005-001 621-000005-001 Backup Device Partitions 20  
    621000006-001 621-000006-001 Backup Device Storage 15.5 MB  
    621000007-001 621-000007-001 Backup Device Store MTK Split Externally  
    621000008-001 621-000008-001 Backup Device Remote PED Enable

    Command result : 0 (Success)  
    lunash:>

To restore the partition contents from the Luna Remote Backup Device to the same local Luna SA HSM, use the same setup as described in the above steps, but use the partition backup restore command instead

[myluna] lunash:>par restore -s 7000179 -tokenPar bk5 -par p1 -replace

Please enter the password for the HSM partition:
> *******

CAUTION: Are you sure you wish to erase all objects in the
          partition named: p1
          Type 'proceed' to continue, or 'quit' to quit now.
          > proceed
Warning: You will need to attach Luna PED to the Luna Backup HSM to complete this operation.
        You may use the same Luna PED that you used for Luna SA.

Please hit <enter> when you are ready to proceed.

Luna PED operation required to login to user on token - use User or Partition Owner (black) PED key.

Object "1-User DES Key1" (handle 17) cloned to handle 11 on target
Object "1-User DES Key2" (handle 18) cloned to handle 12 on target
Object "1-User Public RSA Key1-512" (handle 19) cloned to handle 13 on target
Object "1-User Private RSA Key1-512" (handle 20) cloned to handle 14 on target
Object "1-User Public RSA Key2-512" (handle 21) cloned to handle 15 on target
Object "1-User Private RSA Key2-512" (handle 22) cloned to handle 16 on target
Object "1-User Public RSA Key3-512" (handle 23) cloned to handle 17 on target
Object "1-User Private RSA Key3-512" (handle 24) cloned to handle 18 on target
Object "1-User Public RSA Key4-512" (handle 25) cloned to handle 19 on target
Object "1-User Private RSA Key4-512" (handle 26) cloned to handle 20 on target
Object "1-User Public RSA Key5-512" (handle 27) cloned to handle 21 on target
Object "1-User Private RSA Key5-512" (handle 28) cloned to handle 22 on target
Object "1-User Public RSA Key1-1024" (handle 29) cloned to handle 23 on target
Object "1-User Private RSA Key1-1024" (handle 30) cloned to handle 24 on target
Object "1-User Public RSA Key2-1024" (handle 31) cloned to handle 25 on target
Object "1-User Private RSA Key2-1024" (handle 32) cloned to handle 26 on target
Object "1-User Public RSA Key3-1024" (handle 33) cloned to handle 27 on target
Object "1-User Private RSA Key3-1024" (handle 34) cloned to handle 28 on target
Object "1-User Public RSA Key4-1024" (handle 35) cloned to handle 29 on target
Object "1-User Private RSA Key4-1024" (handle 36) cloned to handle 30 on target
Object "1-User Public RSA Key5-1024" (handle 37) cloned to handle 31 on target
Object "1-User Private RSA Key5-1024" (handle 38) cloned to handle 32 on target
Object "1-User Public RSA Key1-2048" (handle 39) cloned to handle 33 on target
Object "1-User Private RSA Key1-2048" (handle 40) cloned to handle 34 on target
Object "1-User Public RSA Key2-2048" (handle 43) cloned to handle 37 on target
Object "1-User Private RSA Key2-2048" (handle 44) cloned to handle 38 on target
Object "1-User Public RSA Key3-2048" (handle 47) cloned to handle 41 on target
Object "1-User Private RSA Key3-2048" (handle 48) cloned to handle 42 on target
Object "1-User Public RSA Key4-2048" (handle 51) cloned to handle 45 on target
Object "1-User Private RSA Key4-2048" (handle 52) cloned to handle 46 on target
|
|[snip]
|
Object "1-User DES Key5" (handle 111) cloned to handle 105 on target
Object "1-User DES3 Key1" (handle 112) cloned to handle 106 on target
Object "1-User DES3 Key2" (handle 113) cloned to handle 107 on target
Object "1-User DES3 Key3" (handle 114) cloned to handle 108 on target
Object "1-User DES3 Key4" (handle 115) cloned to handle 109 on target
Object "1-User DES3 Key5" (handle 116) cloned to handle 110 on target
Object "1-User AES Key1" (handle 117) cloned to handle 111 on target
Object "1-User AES Key2" (handle 118) cloned to handle 112 on target
Object "1-User AES Key3" (handle 119) cloned to handle 113 on target
Object "1-User AES Key4" (handle 120) cloned to handle 114 on target
Object "1-User AES Key5" (handle 121) cloned to handle 115 on target
Object "1-User ARIA Key1" (handle 122) cloned to handle 116 on target
Object "1-User ARIA Key2" (handle 123) cloned to handle 117 on target
Object "1-User ARIA Key3" (handle 124) cloned to handle 118 on target
Object "1-User ARIA Key4" (handle 125) cloned to handle 119 on target
Object "1-User ARIA Key5" (handle 126) cloned to handle 120 on target
'partition restore' successful.

Command Result : 0 (Success)
[myluna] lunash:>  

To restore onto a different remote Luna SA HSM, the same arrangement is required, but that HSM must already have a suitable partition, which can have any name - it does not need to match the name of the source partition on the backup HSM.

To restate: the backup operation can go from a source partition (on a Luna SA) to an existing partition on the Luna Remote Backup HSM, or if one does not exist, a new partition can be created during the backup -- but the restore operation cannot create a target partition on a Luna SA; it must already exist.

 

Local Backup - distant Luna SA

In this scenario, Luna Remote Backup HSM and Luna Remote PED are both directly connected to your admin workstation/laptop by USB, and that workstation is also a registered client of the Luna SA partition that is being backed-up. The Luna SA appliance is not local to you. The only connection is an SSL/NTLS link. Lunacm is running on your admin workstation/laptop, along with pedserver and pedclient. Pedclient is also running on the distant Luna SA.

Thus, pedserver on the admin workstation is carrying on two conversations, providing PED iservices to two HSMs (the USB-connected Luna Remote Backup HSM sitting on the same table, and the NTLS-connected Luna SA HSM in a server farm somewhere).

 

 

  1. Start the lunacm utility on your admin workstation/laptop.
C:\Program Files\SafeNet\LunaClient>lunacm.exe

LunaCM V2.3.3 - Copyright (c) 2006-2013 SafeNet, Inc.


        Available HSM's:

        Slot Id ->              1
        HSM Label ->            SA52_P1
        HSM Serial Number ->    500409014
        HSM Model ->            LunaSA
        HSM Firmware Version -> 6.10.1
        HSM Configuration ->    Luna SA Slot (PED) Signing With Cloning Mode
        HSM Status ->           OK

        
        Slot Id ->              2
        HSM Label ->            G5backup
        HSM Serial Number ->    700101
        HSM Model ->            G5Backup
        HSM Firmware Version -> 6.10.1
        HSM Configuration ->    Remote Backup HSM (PED) Backup Device
        HSM Status ->           OK

        
        Current Slot Id: 1

lunacm:> 

 

  1. If the current slot is not the slot that you wish to backup, use the lunacm:> slot set command.

 

lunacm:> slot set slot 1

        Current Slot Id: 1     (Luna SA Slot 6.10.1 (PED) Signing With Cloning Mode)


Command Result : No Error

lunacm:> 

 

  1. Establish that the HSM is listening for a Luna PED at the correct.

The pedserver must already have been set up.

 

lunacm:>ped get

        HSM slot 1 listening to local PED (PED id=0).

Command Result : No Error

lunacm:> ped connect ip 192.20.10.190

Command Result : No Error

lunacm:> ped get

        HSM slot 1 listening to remote PED (PED id=100).

Command Result : No Error

lunacm:> 

The distant Luna SA (seen as slot 1 from your workstation/laptop) is now listening for PED interaction via the link between pedclient on the Luna SA appliance, and pedserver on the workstation, if the need arises, and is not expecting a PED connected directly at the location of the Luna SA.

  1. Log into the partition (this takes place at the currently selected slot, which we set as slot 1, back in step 2).

 

lunacm:> par login

        Option -password was not supplied.  It is required.

        Enter the password: *******

        User is activated, PED is not required.

Command Result : No Error

lunacm:> 

 

  1. Disconnect the logical PED connection from your source HSM (slot 1 in this example), and connect to the Luna [Remote] Backup HSM (slot 2 in this example). The PED remains physically connected by USB cable to your workstation/laptop, and remains in Remote mode - you are merely changing slots that are in conversation with that PED.
    First, tell the Luna SA to disconnect from Remote PED.
    Then tell the Backup HSM to connect to Remote PED (it makes no difference that the PED and the Remote Backup HSM are USB-connected to the same workstation/laptop; when use of "Remote PED" is invoked by command "ped connect" and verified by "ped get", all HSM-PED interaction takes place between "pedclient" running on that workstation and "pedserver", also running on that workstation).

 



lunacm:>
lunacm:> ped disconnect

        Are you sure you wish to disconnect the remote ped?

        Type 'proceed' to continue, or 'quit' to quit now -> proceed

Command Result : No Error

lunacm:> ped connect ip 192.20.10.189 -slot 2

Command Result : No Error

lunacm:> ped get -slot 2

        HSM slot 2 listening to remote PED (PED id=100).

Command Result : No Error
lunacm:>

 

  1. Perform the backup from the current slot (slot 1 in the example, see above) to the partition that you designate on the Backup HSM. Now that the Backup HSM is listening correctly for a PED, the target partition can be created, with PED action for the authentication.

 


lunacm:> partition backup backup -slot 2 -par SAbck1

        Logging in as the SO on slot 2.

        Please attend to the PED.

        Creating partition SAbck1 on slot 2.

        Please attend to the PED.

        Logging into the container SAbck1 on slot 2 as the user.

        Please attend to the PED.

        Creating Domain for the partition SAbck1 on slot 2.

        Please attend to the PED.

        Verifying that all objects can be backed up...

        85 objects will be backed up.

        Backing up objects...
        Cloned object 99 to partition SAbck1 (new handle 19).
        Cloned object 33 to partition SAbck1 (new handle 20).
        Cloned object 108 to partition SAbck1 (new handle 23).
        Cloned object 134 to partition SAbck1 (new handle 24).
        Cloned object 83 to partition SAbck1 (new handle 25).
        Cloned object 117 to partition SAbck1 (new handle 26).
        Cloned object 126 to partition SAbck1 (new handle 27).
        Cloned object 65 to partition SAbck1 (new handle 28).
        Cloned object 140 to partition SAbck1 (new handle 29).
        Cloned object 131 to partition SAbck1 (new handle 30).
        Cloned object 94 to partition SAbck1 (new handle 31).
        Cloned object 109 to partition SAbck1 (new handle 35).
        Cloned object 66 to partition SAbck1 (new handle 36).
        Cloned object 123 to partition SAbck1 (new handle 39).
        Cloned object 74 to partition SAbck1 (new handle 40).
        Cloned object 50 to partition SAbck1 (new handle 44).
        Cloned object 43 to partition SAbck1 (new handle 45).
        Cloned object 52 to partition SAbck1 (new handle 46).
        Cloned object 124 to partition SAbck1 (new handle 47).
        Cloned object 115 to partition SAbck1 (new handle 48).
        

        Backup Complete.

        20 objects have been backed up to partition SAbck1
        on slot 2.

Command Result : No Error
lunacm:>

Backup is complete, and can be verified if you like.

 

Again, the Luna SA source partition was physically distant from the workstation that combined admin and Remote Backup and Remote PED functions, but this was still considered a "local" backup scenario, because the workstation was configured and registered as a Client of the Luna SA partition.

If your organization's security and administrative protocols had required that the administrator performing backup not have client access to Luna SA partitions, then you would have used Remote Backup, instead, with an intermediary computer/host/client/server in the mix.

See Also