Restoring a corrupted or lost local keystore from the backup

When the local keystore is not working or is corrupted on a particular node or on the all the nodes of IIAS, you can restore the keystore from the latest backup you have taken.

Restoring the local keystore on a particular IIAS node

If you determined that the local keystore needs to be restored on only one or a subset of nodes in the IIAS system, execute the following steps:
  1. Log in as apuser or equivalent into the node in which the local keystore is corrupted.
  2. Run the
    apsedbackup restore -–fromnode <survivingNode>
    command, where survivingNode is the name of the node that is in a healthy state with respect to the local keystore.
For example, when the local keystore in the node0103 is corrupted or lost, and node0101 has a healthy keystore, run the command from node0103:
[apuser@node0103 ]# apsedbackup restore --fromnode node0101
Key-store already exists. Are you sure you want to overwrite with backup from node0101? (y/n) y 
Restored key-store from node0101

Restoring the local keystore on all nodes from the latest backup

If you determined that the local keystore needs to be restored on all of the nodes in the IIAS system, execute the following steps:
  1. Log in as apuser or equivalent into any of the IIAS nodes.
  2. Download the latest keystore backup into a file system directory from your external backup repository using scp.
    Example:
    [apuser@node0101]# scp  myremoteuser@myremotesystem.domain.com:/backuprepo/latest-sedbackup.tgz  /tmp/mylatestsedbackup
  3. Run the following command:
    apsedbackup restore --frombackup <local backup path>
    where local backup path is the name of the latest backup of the local keystore.
    Example:
    [apuser@node0101]# apsedbackup restore  --frombackup /tmp/mylatestsedbackup/latest-sedbackup.tgz
    Key-store already exists. Are you sure you want to overwrite with your backup file? (y/n) y
    Restored successful from backup file: /tmp/mylatestsedbackup/latest-sedbackup.tgz
  4. After successful restore, you can remove the backup file from the downloaded directory in the IIAS.
    Example:
    [apuser@node0101]# rm -f /tmp/mylatestsedbackup/latest-sedbackup.tgz