Restoring Encryption Management Server Backups larger than 2GB

http://www.symantec.com/business/support/index?page=content&id=TECH149146

Issue

Due to a limitation of Apache, it is not possible to restore backups of 2GB or greater using the Encryption Management Server (previously PGP Universal Server) administrative interface.  To restore backups larger than 2GB requires accessing the server from the command-line interface.


Accessing the Symantec Encryption Management Server (SEMS) command line for read-only purposes (such as to view settings, services, logs, processes, disk space, query the database, etc) is supported. However, performing configuration modifications or customizations via the command line may void your Symantec Support agreement unless the following procedures are followed.

Any changes made to SEMS via the command line must be:

  • Authorized in writing by Symantec Support.
  • Implemented by a Symantec Partner, reseller or Symantec Technical Support.
  • Summarized and documented in a text file in /var/lib/ovid/customization on the PGP Universal Server itself.

Changes made through the command line may not persist through reboots and may be incompatible with future releases. Symantec Technical Support may also require reverting any custom configurations on SEMS back to a default state when troubleshooting new issues.

Solution

To restore a backup larger than 2GB in size:

  1. Copy the most current backup file of SEMS to a network drive or other location.
  2. Export the Organization Key of the server from the SEMS administrative interface.
    Note: It is important to export the full keypair with no passphrase. Entering the passphrase will cause the restore process to fail.
  3. Install SEMS from the .iso image.
  4. Import your SSH key to the server.
  5. Import the Organization key to the server.
  6. Connect to the server with WinSCP and copy the backup to the /var/lib/ovid/backups/ directory on the server.
  7. Access the server via SSH. For more information on accessing the server via SSH, see article TECH149673.
  8. Run pgpbackup --restore <backupfile.pgp> --key <orgkeyfile.asc> --done
  9. Restart tomcat using the command: #pgpsysconf --restart tomcat

Access Symantec Encryption Management Server via SSH Using PuTTY

http://www.symantec.com/business/support/index?page=content&id=TECH149673

 

Issue

To gain command line access to a Symantec Encryption Management Server (previously PGP Universal Server), you will need to create an SSH key.  You can do this using a utility such as PuTTYgen to create an SSH key and PuTTY to log in to the command line interface.  This article details how to utilize PuTTYgen and PuTTY to access Symantec Encryption Management Server (SEMS) .
PuTTY is a freeware suite of SSH tools. The PuTTY suite includes PuTTYgen, PuTTY, PSFTP, and Pageant the PuTTY authentication agent. The PuTTYgen and PuTTY.exe files are also available to be downloaded separately.

Accessing the server command line for read-only purposes (such as to view settings, services, logs, processes, disk space, query the database, etc) is supported. However, performing configuration modifications or customizations via the command line may void your Symantec Support agreement unless the following procedures are followed.
Any changes made to the server via the command line must be: 

  • Authorized in writing by Symantec Technical Support or published as an approved and documented process on the Symantec Knowledge Base.
  • Implemented by a Symantec Partner, reseller or Symantec Technical Support.
  • Summarized and documented in a text file in /var/lib/ovid/customization on the Symantec Encryption Management Server itself.

Note: Changes made through the command line may not persist through reboots and may be incompatible with future releases.  Symantec Technical Support may also require reverting any custom configurations on the server back to a default state when troubleshooting new issues.

Solution

Using PuTTYgen

To create an SSH keypair using PuTTYgen
These steps assume the entire suite of PuTTY utilities is installed on the computer. The following steps may also be performed using the separately downloaded PuTTYgen.exe and PuTTY files. 

  1. Open PuTTYgen.
  2. Confirm the Parameters (at the bottom of the PuTTY Key Generator window) for the type of key to generate. The parameters of the key must utilize one of the SSH2 options. We recommend that you choose SSH-2 RSA (the default). Set the Number of bits to 2048
  3. Create a key pair by clicking on the Generate button in the Actions sectionGenerate some randomness for the key by moving the mouse over the blank area.

image

image

4  .After the key generation is complete, copy the public key block from PuTTY window into a SEMS admin account by performing the following:

 

5. Copy the public key from the clipboard window in the PuTTY Key Generator where it says “Public key for pasting into OpenSSH authorized_keys file:"

image

6. Log in as a superuser to the server admin interface.

image

7. Select the System > Administrators card then click on a superuser account. Note: It does require the user to be a superuser administrator to use SSH access. Other roles are not supported to use SSH access.

image

8. Click the plus + sign at the end of the SSHv2 Key line. This will bring up a window that displays Update SSH Public Key.

image

9.  Click the Import Key Block radio button and paste the public key block that you just generated with PuTTYgen directly into this block and click the Import button.

image

image

10.  After you upload the key block you will notice the hex fingerprint of the key will now show up in SSHv2 Key line. You can verify that the fingerprint matches the fingerprint found in the Key fingerprintt line on PuTTY Key Generator to verify that the key was imported succesfully

image

image

 

11.  Click Save and close the administrative interface.

12.  Next go back to your desktop and save the public and private key within PuTTYgen.

image

image

Note: The minimum key size when generating a key is 1024-bit.  Intermittently PuTTYgen may generate a 1024-bit key as a 1023-bit key due to a bug in PuTTYgen. Thereby causing the key not to work properly. The best practice is to generate a key of at least 1025-bit to avoid the potential problem. We recommend generating a key 2048-bit in length to solve this issue.

Access SEMS using PuTTY

Use the following steps to access the command line interface. 

  1. Open PuTTY from the Start menu.

Enter the SEMS hostname (keys.domain.com) or IP address in the hostname field

  1. If not already entered, change the Port field to use port 22.
  2. Select the SSH radio button as the protocol.

image

  1. Click Auth (under Category>Connection>SSH)
  2. Browse to the private key and add the file that you saved and click Open to start a session. You will be prompted to enter a username. 

image

  1. Type: root and press Enter.

image

image

 

image


【一些 postgres SQL 指令】

show all postpres SQL table

SELECT table_name FROM information_schema.tables WHERE table_schema = ‘public’;

select * from internal_user_name;

select * from whole_disk_recovery_token;

select * from internal_user where desktop_lastseen < NOW() – INTERVAL’1 months’;

 

 

select * from internal_user_name;

image

select * from whole_disk_recovery_token;

image

 


【如何從資料庫中查詢某使用者的 WDRT token】

查詢使用者的 WDRT token,並非透過使用者名稱去查詢,而是要透過電腦名稱來查詢,該電腦上若有多個使用者註冊 PGP Universal Server,則每個人的 WDRT token 是相同的

image

image

select * from all_devices where name=’allenchung01-PC’;

會查詢到 ‘allenchung01-PC’ 的 machine_id  是  ‘61997a59-1157-4e2c-bf3f-3e67a580d9b8’

image

select * from whole_disk_recovery_token where device_id=’61997a59-1157-4e2c-bf3f-3e67a580d9b8′ and is_current=’T’;

查到 Token: 0GMHJ-9TEB0-WCAF7-6XC7G-FNT46-QBH

 

※ 如果想匯出相關資訊可使用以下指令

psql oviddb ovidr -c “SELECT * FROM whole_disk_recovery_token" > /tmp/WDRT.csv

image

 

  • If your public key is not accepted by SEMS when you are trying to paste it in from the PuTTYgen window, make sure you are not accidentally adding whitespace when pasting the keyblock.  If it still doesn’t work go through the entire key generation process again. From within Puttygen make sure you have clicked at the very bottom: SSH-2 for the type of key to generate.
  • If your public key is not being accepted and you receive an error stating that the SSH key is not valid when importing to SEMS, this may be due to you saving the key file using the Save public key option in the PuTTY Key Generator utility.  This uses a format that SEMS doesn’t support.  Be sure to copy the key from the portion of the clipboard as described in Step 5 above.
  • The first time you log into SEMS with PuTTY, you will be given a security warning, this is normal.  Just click yes and proceed as above.
  • Saving your session for future use:
    You may want to go back to the (Category > session) tab and type a descriptive name in the box directly under the words Saved Sessions. If you do this and click Save you will notice that the name you typed appears in the larger box as a Saved Session.  Now you will be able to access your configured login for SEMS in the future just by double-clicking on the saved session name.

【備份、還原、移機】Restore Symantec Encryption Management Server (PGP Universal Server) from a Backup

如果您使用 Symantec Encryption Management Server (PGP Universal Server) 並且有備份 Organization Key 和 System Backup

那麼,您可以安心地將 Symantec Encryption Management Server (PGP Universal Server) migrate 到另一台機器

透過以上的方式您可以對 Symantec Encryption Management Server (PGP Universal Server) 進行移機(並升級),或是在他台機器上進行災難復原

 

【移機(並升級) 是在他台機器上進行災難復原】的步驟如下:

1.在原機器上匯出 Organization Key 和 System Backup

2.在新機器上安裝新版 Symantec Encryption Management Server (PGP Universal Server)

重啟後,登入Web UI,在 Setup Type 畫面不要選擇預設的【New Install】,請選擇【Restore】

然後在出現的【Import Organization Key】與【Upload Current Backup File】畫面,匯入Organization Key 和 System Backup

3.記得,還原的程序會花費一些時間,這段時間畫面不會改變,Web UI 也會失去連線

請等到 Symantec Encryption Management Server (PGP Universal Server) 機器的畫面出現【Initial…………..Reloading……】,並且Web UI (使用先前機器的 IP) 可連線,還原程序才正式完成

4.還原後,相關網路設定、Group、Consumer Policy、Key 所有的東西都會還原回去

 

詳細畫面如下

1.在原機器上匯出 Organization Key 和 System Backup

[ 匯出 Organization Key ]

image

image

image

image

[ 取得 System Backup ]

image

image

image

2.在新機器上安裝新版 Symantec Encryption Management Server (PGP Universal Server)

安裝步驟請參考以下網頁

http://www.wellife.com.tw/symantec/?p=233

重啟後,登入Web UI,在 Setup Type 畫面不要選擇預設的【New Install】,請選擇【Restore】

image

然後在出現的【Import Organization Key】與【Upload Current Backup File】畫面,匯入Organization Key 和 System Backup

3.記得,還原的程序會花費一些時間,這段時間畫面不會改變,Web UI 也會失去連線

請等到 Symantec Encryption Management Server (PGP Universal Server) 機器的畫面出現【Initial…………..Reloading……】,並且Web UI (使用先前機器的 IP) 可連線,還原程序才正式完成

4.還原後,相關網路設定、Group、Consumer Policy、Key 所有的東西都會還原回去

 

官網參考連結

Enterprise Support – Symantec Corp. – HOW TO Restore Symantec Encryption Management Server from a Backup

http://www.symantec.com/business/support/index?page=content&id=HOWTO42032

Enterprise Support – Symantec Corp. – Upgrade to Symantec Encryption Management Server 3.3.1

http://www.symantec.com/business/support/index?page=content&id=HOWTO93842

Enterprise Support – Symantec Corp. – HOW TO Backup the Organization Key on Encryption Management Server

http://www.symantec.com/business/support/index?page=content&id=HOWTO42046

Enterprise Support – Symantec Corp. – HOW TO Create Symantec Encryption Management Server Backups

http://www.symantec.com/business/support/index?page=content&id=HOWTO42105