This section describes how to transfer your SMG system from the SMG appliance to a new server. The process may be used for a single server system or a node of a multi-server system.
A new SMG server. See Installing a New SMG Server for more information.
IMPORTANT:You must have the same (or more) CPU, RAM, and disk space on your new server as you do on your old server in order to run the migration.
Shell access to the old and new SMG systems
Root privileges on the old and new SMG servers
Basic linux terminal commands knowledge such as listing files and setting file permissions
Due to the nature of data stored in SMG, it is not possible to provide and estimate of how long the process will take. You can safely estimate this for your system while it is actively running by following the entire migration process without completing the final step of reassigning IP addresses. This will complete the migration, but the data will most likely not be synchronized, and the migration should not be considered valid. The time taken will be approximately the same as completing the entire process.
The source SMG system has no system level alterations that change the locations of files or the names of databases. Where changes exist, please ensure to adjust the process steps accordingly to conform to your system configuration.
Older SMG systems that are not up to date may have different base paths than those specified.
If the folder /opt/opentext does not exist on your system, replace this with /vastorage for the purpose of this document.
You must have the same (or more) CPU, RAM, and disk space on your new server as you do on your old server in order to run the migration.
The migration process is completed by following these steps:
Prepare and install a new SMG server. The server need to be configured to the point that you are able to login to the SMG administrations. Follow the steps in Installing SMG to install a new SMG server.
If you want to use the same DNS name for your new server, the new server should be given a temporary IP address and while you can migrate the data from the old system to the new system. The IP address on the new system will be changed at the end of the migration process to match the old system.
IMPORTANT:Passwords for the new system, including the database login, need to match the old server.
You need to disable the SMG on both the old and new servers to prevent data synchronization problems and corruption problems.
Shutdown the SMG application by running the following command on both servers:
service smg stop
Check that the services have stopped by running the following command:
service smg status
Once the system shows that the SMG services has stopped running, continue with Transferring Internal Configuration Files.
Copy the following files/folders from the old server and set the permissions on the new server to be the same as the old server:
/opt/opentext/config/system.xml /opt/opentext/smg/smg-supervisor/http_local (all files and folders in this directory)
(Optional) If you have configured DKIM services, copy the following files as well:
/etc/opendkim/key.table /etc/opendkim/signing./table /etc/opendkim/keys (all files and folder in this directory)
(Optional) If you are using custom server certificates, copy them to the following location on the new server:
/opt/opentext/smg/conf/certs/
Continue with Backing up Databases.
IMPORTANT:This steps is not required if the postgres database is hosted on a different server. Multi-node SMG systems only have a single master database server, so this step is not required on servers that do not host the database.
Run the following commands to backup all of the SMG databases to a temporary folder. You will move the dump files later.
pg_dump --format=p -U postgres SecureGateway > SecureGateway.dump pg_dump --format=p -U postgres SecureGatewayStats > SecureGatewayStats.dump pg_dump --format=p -U postgres SecureGatewayTracker > SecureGatewayTracker.dump pg_dump --format=p -U postgres SecureGatewayQuarantine > SecureGatewayQuarantine.dump
Continue with Backing Up Quarantine Data.
This is the majority of the data that is transferred to the new system. The recommended method of backing up this data is to zip up the files so they can be easily moved to the new server.
Run the following commands to zip up the files:
cd /opt/opentext/smg/smg-quarantine/data_store zip -r qms-backup.zip *
Continue with Transferring Backups and Restoring the Data.
Copy the database dump files and the qms.backup.zip file to the new server.
Move the qms-backup.zip file into the /opt/opentext/smg/smg-quarantine/data_store folder, and run the following commands:
cd /opt/opentext/smg/smg-quarantine/data_store unzip -o qms-backup.zip chown -R smg:smg *
Use the following commands to restore the databases:
NOTE:If an error occurs referencing the non-existence of a database, repeat the command without the --clean option, and then repeat the command again with the --clean option until no errors occur.
The -h and -p options assume the Postgres server is located locally and listening on the default port. If you receive error about connecting to the database, try removing both of these parameters, or adjust them to accomodate your server configuration.
pg_restore -h 127.0.0.1 -p 5432 --clean --create -U postgres -d postgres SecureGateway.dump pg_restore -h 127.0.0.1 -p 5432 --clean --create -U postgres -d postgres SecureGatewayQuarantine.dump pg_restore -h 127.0.0.1 -p 5432 --clean --create -U postgres -d postgres SecureGatewayStats.dump pg_restore -h 127.0.0.1 -p 5432 --clean --create -U postgres -d postgres SecureGatewayTracker.dump
Continue with Switching the IP Address.
IMPORTANT:This step should be skipped if you are only evaluating how long the migration would take. Restart the services on your old SMG server to bring it back online until you are ready to perform the migration.
Change the IP address of the old server to a temporary IP address.
This allows access to content on that server in case anything was missed and needs to be brought over after the migration is complete.
Change the IP address of the new server to the original SMG IP address.
Restart the new SMG server to bring it online.
Your migration is complete and everything should be running as it was previously.
(Optional) If you are using custom certificates, on the new server, open the Management Interface and navigate to Interface > SMTP Interface Manager and change the path to the SSL certificates to /opt/opentext/smg/conf/certs/.