3.6 Migrating to the SMG on SLES Appliance

When migrating from an older version of SMG to the SMG SLES Appliance, you use the install option to replace an existing Secure Messaging Gateway server. This starts a wizard that collect information about the server being replaced. If the server being replaced contains SMG database(s), the wizard creates a script to back up the databases on server being replaced and the restore them on the new SMG on SLES server. It then creates scripts to copy critical system and security files from the existing SMG server to the new SMG on SLES server. It creates a single script to call all the required scripts.

If the server being replaced contains relay queues or quarantine messages, scripts are created to copy these files to the new SMG on SLES server. Copying these files is optional and can be done while the new SMG on SLES server is in place and processing mail.

All scripts are created on the SMG on Ubuntu server being replaced and must be executed from a console on the SMG on Ubuntu server.

IMPORTANT:The migration wizard the following limitations:

  • It cannot be used to migrate a SMG system that uses a remote Postgres Server.

  • If used in a multi-server SMG network, the primary server (the one that contains the system configuration database) must be migrated first.

  • When migrating a multi-server system, you must plan to move all servers from SMG on Ubuntu to SMG on SLES. SMG on SLES and SMG on Ubuntu will not work in the same SMG system.

To migrate your server from Ubuntu to SLES:

  1. Download the SLES OVA file and open it in VMware to import the file.

  2. Edit the virtual machine settings to allocate the required CPU (1), RAM (2 GB), and hard drives as specified in the System Requirements.

  3. Power on the Virtual Machine to start the appliance install.

  4. When prompted, accept the EULA.

  5. On the Secure Messaging Gateway Password and Time Zone page do the following:

    • Enter a root password. This is the main password. Write it down for future reference.

    • Enter a vaadmin password. This is the main password for Virtual Appliance Administration. Write it down for future reference.

    • Enter the NTP server(s) and select a Region and a Time Zone

  6. On the Secure Messaging Gateway Network Settings page do the following:

    • Enter the Hostname of the SMG server.

    • (Optional) Select Configure a Network Proxy and enter your proxy settings.

      Click Next to enter the rest of the settings.

    • Enter the IP Address of the SMG server, Network Mask, Gateway, DNS Server(s), and Domain Search.

  7. On the Secure Messaging Gateway Data Store Location page, select the secondary hard drive for the application data (default size for this is 50 GB).

    The install configures the appliance operating system.

  8. In a browser, open the VAAdmin Console by going to https:// <ip or dns of smg server>:9443 and login using vaadmin and the password you set earlier.

  9. Prep the SMG on SLES server to receive connections from the SMG on Ubuntu server by doing the following

    • Enable SSH on the Appliance by going to System Services, selecting SSH > Action > Start. Then select Options > Set as Automatic. You can turn off this settings after the migration has completed.

    • Enable connections to Postgresql by going to Configure Postgresql and entering the IP Addres of the SMG on Ubuntu server in Allowed Connections. Remove this setting after the migration has completed.

    • Update the Postgresql user and password on your SMG on SLES server to be the same as the SMG on Ubuntu server by going to phpPgAdmin, select PostgreSQL in the navigation on the right and enter the default username and password “ postgres”. Select the Roles tab and either Alter the postgres user’s password or create a user that matches the one on your SMG on Ubuntu server.

      NOTE:You only need to update the Postgresql user and password if you changed it from the default.

  10. Select SMG User Interface > Role > Replace an existing Secure Messaging Gateway server to run the SMG migration.

  11. Enter the following information on the Replace an existing Secure Messaging Gateway server page:

    • Server name: The name of the SMG Ubuntu server to be replaced.

      NOTE:This can be found on the SMG Ubuntu server under System Management > Manage Servers.

    • Server DB user name: The postgres database user for the postgresql server on the server being replaced. This is only required if the server being replace contains SMG databases.

    • Server DB password: The password for the Server DB user name on the server being replaced. This is only required if the server being replace contains SMG databases.

    • DB Server address: Either the server name (if in dns) or the ip address of the postgresql server that contains the configuration database.

    • DB name: The name of the SMG configuration database.

    • DB user name: A postgres user name that can open and read the configuration database.

    • DB password: The password for the DB user name. The default password for the database is postgres.

    NOTE:For the migration wizard to work the new SMG on SLES server must be able to connect to the SMG configuration database. This may require that you add an entry to the pg_hba.conf on the postgresql server that contains the SMG configuration database. You must also enable the ssh daemon on the SMG on SLES server as well as configure the postgresql server on the new SMG on SLES server to allow a connection from the SMG on Ubuntu server being replaced. To do this, run the following commands from the Ubuntu server:

    chmod +x /opt/gwava/assets/bin/linux/scripts/pg_enable_access.sh
    /opt/gwava/assets/bin/linux/scripts/pg_enable_access.sh 
          <SMG on SLES IP Address>
         
  12. When you proceed to the wizard validation step, the wizard will perform a number of checks; confirm that ssh is enable, connect to the configuration database and collect information about the server being replaced. If all validation checks pass then it will write information into the configuration database to allow the SMG on Ubuntu server to continue with the migration steps and generate the necessary scripts. It will also give instructions and a link to start the SMG administration UI on the SMG on Ubuntu server.

  13. Once you open the SMG administration UI on the Ubuntu server, advance the wizard on the SLES appliance to install.

  14. In the administration UI on the server being replaced, if you go to the System Management/Manage Servers page and select the server to be replaced. You will notice a Prepare button. This button will only be presented if the wizard has been run and validation has been completed on a new SMG on SLES appliance.

    When you click on the Prepare button the scripts will be generated and place in the /opt/gwava/replace directory on the SMG on Ubuntu server. The page tells you how to run the scripts. If an problem occurs gathering the required information or connecting to the postgres server or via ssh on the SMG server and error/troubleshooting page will be presented.

    The command you need to run is sudo ./replace_server.sh.

    NOTE:The final step in the script is to assign the IP address of the SMG on SLES server to the SMG on Ubuntu server (the one being replaced) and shutdown the SMG on Ubuntu server.

  15. On the SMG on SLES server, you see that the required steps have been completed. To finish, you need to change the IP address of the server to that of the server being replaced.

  16. In the VAAdmin Console (https://<SMG on SLES Appliance ip or dns>:9443), select Network. Click eth0 and change the IP address to be that of the replaced Ubuntu server. Click OK and click Reboot in the top right to restart the server.

  17. To copy the quaratine files from the Ubuntu server to the SLES server, start the SMG on Ubuntu server, open a console, browse to /opt/gwava/replace and run the following command:

    sudo ./copy_files.sh

    This begins copying the quarantine files and queue files from the replaced SMG on sUbuntu server to the SMG on SLES server