Difference between revisions of "Moving Roles"

[unchecked revision][checked revision]
 
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Renaming the server where the SPE runs on in Single Server Mode =
+
== Single Server Mode ==
 +
In order to retain a single server mode setup by keeping the Management Server, Instance Host and Client Access Server on a single server, follow the instructions below. If only one of the roles in a single server mode setup should to be moved to another server, refer to corresponding section under [[Moving Roles#Multi_Server_Mode|Multi Server Mode]] in this article.
  
When the server has been renamed, the management dashboard will show you the warning
+
* The following only applies if MFA has been enabled for some or all system administrators:
<p class=msnote>The Name of this Server differs from the licensed Machine Name. Therefore your license has been disabled.</p>
+
*:* Log in at the Management Console and [[Management_Console_-_System_Administrators|disable MFA]] for all administrators that have it enabled.<br />The MFA secret, that is used to generate MFA codes, is stored DPAPI-protected in the management database. When the management database is transferred to a different machine, the secret cannot be decrypted on that machine and manual editing of the database would be required, which should be avoided.
The <tt>Instance Host</tt> and <tt>Client Access Server</tt> roles are not connected to the <tt>Management Server</tt> role and the instances are not started. Perform the following steps to get your SPE running again:
+
* Start the MailStore Service Provider Edition Configuration tool on the server that has the Management Server role by double-clicking its desktop icon. On Windows Server Core use the command line prompt to start the executable (default: <tt>%PROGRAMFILES%\MailStore Infrastructure\MailStoreInfrastructureConfig.exe</tt>.
 
+
* Stop the ''Client Access Server'', ''Instance Host'', and ''Management Server'' services.
* Start the ''MailStore Service Provider Edition Configuration'' and stop the MailStore SPE instance host, client access server and management roles.
+
* Transfer your MailStore SPE license to the new server through our [https://my.mailstore.com/TransferLicense license portal].
* Transfer your MailStore SPE license through our [https://my.mailstore.com/TransferLicense license portal].
+
* Install MailStore Service Provider Edition on the new server and set it up [[Single_Server_Mode_Setup|Single Server Mode]].
* Open the configuration of the management role and adjust the <tt>Server Name</tt> to match the new name.
+
* Stop the ''Client Access Server'', ''Instance Host'',  and ''Management Server'' services on the new server.
*: [[File:ms_spe_config_mgmt_02.png|center]]
+
* Remove all MailStore SPE related certificates from the server's personal (MY) certificate store of the new server.
* Start the management server role.
+
*: [[File:Spe-certificate-store.png|center]]
* Log in into the dashboard and verify that he license warning is gone.
+
* Export the SSL certificates and private keys from the old server's certificate store and import them into the same location on the new server.  
* Open the configuration of the instance host role and adjust the <tt>Server Name</tt> to match the new name. Additionally enter the new server name in the <tt>Management Server</tt> field and [[Multi_Server_Mode_Setup#Pairing_with_Management_Server|pair]] this role with the management server role.
+
** On Windows Server 2016 and newer you can use the following PowerShell command to export all certificats stored in the computers ''MY'' store as PFX containers to the current user's desktop. That PowerShell session requires elevated privileges:<br/><pre>(Get-ChildItem Cert:\LocalMachine\My).Thumbprint | ForEach-Object { Export-PfxCertificate -Cert ("Cert:\LocalMachine\My\{0}" -f $_) -FilePath ("$env:USERPROFILE\Desktop\{0}.pfx" -f $_) -Password  (ConvertTo-SecureString -AsPlainText -Force "not_secure_234") }</pre>
*: [[File:ms_spe_config_ih_01.png|center]]
+
** Windows Server 2016 and newer Powershell command to import the previously exported certificates from the current user's desktop into the new server's certificate store. That PowerShell sessions requires elevated privileges:<br/><pre>Get-ChildItem -Path $env:USERPROFILE\Desktop\ -Filter *.pfx | Import-PfxCertificate -Exportable -Password  (ConvertTo-SecureString -AsPlainText -Force "not_secure_234") -CertStoreLocation Cert:\LocalMachine\My</pre>
* Start the instance host role.
+
* Remove the <tt>%program files%\MailStore Infrastructure\config</tt> directory on the new server and replace it with the <tt>config</tt> directory from the old one.
* Change the <tt>Instance Host</tt> setting in the [[Instance_Management_-_General_Administration#Configuring Instances|instance configuration]] of each instance.
+
* Transfer your instance data directories to the new server. If the instance data on the new server is stored in a different location than on the old one, the ''Base Directory'' of the instances must be adjusted accordingly. Refer to [[Instance_Management#Archive_Stores|Instance Management]] for further details.
*: [[File:Ms_spe_move_instance_01.png|center]]
+
* When the host name of the server has changed, also follow the instructions in [[Renaming_Servers#Renaming_the_Server|Renaming the Server]]
* [[Management_Console_-_Infrastructure#Instance_Hosts|Remove]] the old instance host servername from the dashboard.
+
* Start the ''Management Server'' service followed by the ''Instance Host'' and ''Client Access Server'' service.
* Open the configuration of the client access server role and adjust the <tt>Server Name</tt> to match the new name. Additionally enter the new server name in the <tt>Management Server</tt> field and [[Multi_Server_Mode_Setup#Pairing_with_Management_Server|pair]] this role with the management server role.
+
* [[Management Console - Logging On|Log on]] to the Management Console and check the dashboard for the connection status of servers and roles.
*: [[File:ms_spe_config_cas_01.png|center]]
+
* [[Management_Console_-_System_Administrators|Re-enable Multi-Factor Authentication]] for system administrators that had it enabled.
* Start the client access server role.
+
* [[Management_Console_-_General#SMTP_Settings|Re-enter the SMTP password]] if it had been set.
* [[Management_Console_-_Infrastructure#Client_Access_Servers|Remove]] the old client acces server servername from the dashboard.
 
 
 
= Renaming the management server when the SPE runs on in Multi Server Mode =
 
  
* Start the ''MailStore Service Provider Edition Configuration'' and stop the management role.
+
== Multi Server Mode ==
 +
=== Moving the Management Server ===
 +
* The following only applies if MFA has been enabled for some or all system administrators:
 +
*:* Log in at the Management Console and [[Management_Console_-_System_Administrators|disable MFA]] for all administrators that have it enabled.<br />The MFA secret, that is used to generate MFA codes, is stored DPAPI-protected in the management database. When the management database is transferred to a different machine, the secret cannot be decrypted on that machine and manual editing of the database would be required, which should be avoided.
 +
* Start the MailStore Service Provider Edition Configuration tool on the server that has the Management Server role by double-clicking its desktop icon. On Windows Server Core use the command line prompt to start the executable (default: <tt>%PROGRAMFILES%\MailStore Infrastructure\MailStoreInfrastructureConfig.exe</tt>.
 +
* Stop the ''Management Server'' service.
 
* Transfer your MailStore SPE license through our [https://my.mailstore.com/TransferLicense license portal].
 
* Transfer your MailStore SPE license through our [https://my.mailstore.com/TransferLicense license portal].
* Rename and restart the server.
+
* Install the MailStore Service Provider Edition on the new server and set it up in [[Multi_Server_Mode_Setup|Multi Server Mode]]
* Open the the configuration of each role connected to this management server and adjust the ''Management Server'' setting.
+
* Add the ''Management Server'' role on the new server, but do not start it yet.
* Start each role.
+
* Transfer the file <tt>MailStoreManagementDatabase.json</tt> from the old server's configuration directory to the same location on the new server. By default, this file resides in <tt>%programfiles\MailStore Infrastructure\config%</tt>.
* Check the dashboard that every role is connected again.
+
* Start the ''Management Server'' service on the new server.
 
+
* Adjust the ''Management Server'' setting in the configuration of each  ''Instance Host'' and ''Client Access Server'' by clicking on the corresponding ''Configure...'' button in the MailStore Service Provider Edition Configuration tool.
= Moving the SPE running in Single Server Mode to another server =
+
* [[Management Console - Logging On|Log on]] to the Management Console and check the dashboard for the connection status of servers and roles.
 
+
* [[Management_Console_-_System_Administrators|Re-enable Multi-Factor Authentication]] for system administrators that had it enabled.
* Close all MailStore SPE related programs, except for the ''MailStore Service Provider Edition Configuration'' on the old server.
+
* [[Management_Console_-_General#SMTP_Settings|Re-enter the SMTP password]] if it had been set.
* Stop the MailStore SPE instance host, client access server and management roles.
 
* Transfer your MailStore SPE license to the new server through our [https://my.mailstore.com/TransferLicense license portal].
 
* Install MailStore SPE on the new server.
 
* Stop all roles on the new server.
 
* Remove all MailStore SPE related certificates from the new server's personal (MY) certificate store.
 
* Export the SSL certificates and private keys from the old server's certificate store and import it to the same location on the new server.  
 
''' On Windows Server 2012 R2 you can use the following PowerShell command to export all certificats stored in the computers ''MY'' store as PFX containers to the current user's desktop '''
 
(Get-ChildItem Cert:\LocalMachine\My).Thumbprint | ForEach-Object { Export-PfxCertificate -Cert ("Cert:\LocalMachine\My\{0}" -f $_) -FilePath ("$env:USERPROFILE\Desktop\{0}.pfx" -f $_) -Password  (ConvertTo-SecureString -AsPlainText -Force "not_secure_234") }
 
''' Windows Server 2012 R2 Powershell command to import the previously exported certificates from the current user's desktop into the new server's certificate store'''
 
Get-ChildItem -Path $env:USERPROFILE\Desktop\ -Filter *.pfx | Import-PfxCertificate -Exportable -Password  (ConvertTo-SecureString -AsPlainText -Force "not_secure_234") -CertStoreLocation Cert:\LocalMachine\My
 
* Remove the ''%program files%\MailStore Infrastructure\config'' directory on the new server, replace it with the ''config'' directory from the old one.
 
* Transfer you instance data directories to the new server.
 
* When the name of the server has changed, open the management role configuration and adjust the ''Server Name''.
 
* Start the management role.
 
* Try to log in into the management webinterface. The log in should be successful, but when the server name has changed, the connection to the instance host and client access server should be failed.
 
* Open the client access server configuration and adjust the ''Server Name'' and the ''Management Server'' if it has changed. The ''Server Name'' must be in lower case. Perform the pairing.
 
* Start the client access server role.
 
* Verify that the connection to the client access server can be established in the dashboard.
 
* [[Management_Console_-_Infrastructure#Client_Access_Servers|Remove]] the leftovers of the other client access server.
 
* Open the instance host configuration and adjust the ''Server Name'' and the ''Management Server'' if it has changed. The ''Server Name'' must be in lower case. Perform the pairing.
 
* Start the instance host role.
 
* Verify that the connection to the instance host can be established in the dashboard.
 
* [[Management_Console_-_Infrastructure#Instance_Hosts|Change]] the location of the instance host's base directory, if it has changed.
 
[[File:Ms_spe_move_instance_01.png|center]]
 
* [[Moving_Instances|Change]] the configuration of each instance to reflect the new ''Server Name'' and path.
 
* [[Management_Console_-_Infrastructure#Instance_Hosts|Remove]] the leftovers of the other instance host.
 
 
 
= Moving the Management Server role to another server =
 
 
 
* Stop the management role on the old server.
 
* Transfer your MailStore SPE license to the new server through our [https://my.mailstore.com/TransferLicense license portal].
 
* Install the SPE on the new server and select ''Multi Server Mode''.
 
* Add the management role on the new server.
 
* Stop the management role.
 
* Transfer the file ''MailStoreManagementDatabase.json'' from the old server's config directory to the new server to the same location.
 
* Open the the configuration of each role connected to the old management server, adjust the ''Management Server'' setting and pair the roles with the new management server.
 
* Check the dashboard that every role is connected again.
 
 
 
= Moving the Client Access Server role to another server =
 
 
 
* Export the certificates, including their private keys, that are visible to the end users on the old client access server. By default these are MailStoreClientAccessServerHttp and MailStoreClientAccessServerImap, but not MailStoreClientAccessServerTcp.
 
* Import these certificates on the new server.
 
* Install the SPE on the new server and select Multi Server Mode.
 
* Add the client access server role.
 
* Pair the role with the existing management server.
 
* Check the certificate settings.
 
* Start the role.
 
* Check the dashboard if the client access server is reachable.
 
* Remove the role from the old server.
 
* Remove the leftovers of the old server in the Dashboard -> INFRASTRUCTURE -> Client Access Servers.
 
* Optional:
 
** Adjust your DNS settings.
 
** Adjust your client settings.
 
  
= Moving the Instance Host role to another server =
+
=== Moving an Instance Host ===
 +
* Start the MailStore Service Provider Edition Configuration tool on a server that is a Instance Host by double-clicking it's desktop icon. On Windows Server Core use the command line prompt to start the executable (default: <tt>%PROGRAMFILES%\MailStore Infrastructure\MailStoreInfrastructureConfig.exe</tt>.
 +
* Stop the ''Instance Host'' service.
 +
* Install MailStore Service Provider Edition on the new server and set it up in [[Multi_Server_Mode_Setup|Multi Server Mode]].
 +
* Add the ''Instance Host'' role.
 +
* [[Multi_Server_Mode_Setup#Pairing_with_Management_Server|Pair with the Management Server]].
 +
* Start the ''Instance Host'' service.
 +
* [[Management Console - Logging On|Log on]] to the Management Console and check the dashboard for the connection status of servers and roles.
 +
* Follow the [[Moving_Instances|Moving Instances]] guide to move the instances to the new instance host.
 +
* Remove the ''Instance Host'' role from the old server.
 +
* Finally [[Management_Console_-_Infrastructure#Removing_Instance_Hosts|remove the instance host]] that still exist with the old host name.
  
* Install the SPE on the new server and select Multi Server Mode.
+
=== Moving a Client Access Server ===
* Add the instance host role.
+
* Export the certificates, including their private keys, that are visible to the end users on the old client access server. By default these are ''MailStoreClientAccessServerHttp'' and ''MailStoreClientAccessServerImap'', but '''not''' ''MailStoreClientAccessServerTcp''.
* Pair the role with the existing management server.
+
* Import these certificates into the new server's personal (MY) certificate store.
* Start the role.
+
* Start the MailStore Service Provider Edition Configuration tool on a server that is a Client Access Server by double-clicking it's desktop icon. On Windows Server Core use the command line prompt to start the executable (default: <tt>%PROGRAMFILES%\MailStore Infrastructure\MailStoreInfrastructureConfig.exe</tt>.
* Check the dashboard if the instance host is reachable.
+
* Stop the ''Client Access Server'' service.
* Stop all instances running on the old server.
+
* Install MailStore Service Provider Edition on the new server and set it up in [[Multi_Server_Mode_Setup|Multi Server Mode]].
* Move the base directories of the instances to the new instance host.
+
* Add the ''Client Access Server'' role.
* Change the <tt>Instance Host</tt> setting in the [[Instance_Management_-_General_Administration#Configuring Instances|instance configuration]] of each instance.
+
* [[Multi_Server_Mode_Setup#Pairing_with_Management_Server|Pair with the Management Server]].
[[File:Ms_spe_move_instance_01.png|center]]
+
* Adjust the certificate settings in the ''Configure Client Access Server Role'' dialog to use the imported certificates.
* Adjust the path to the ''Base Directory'' if it has changed.
+
* Start the ''Client Access Server'' service.
* Start the the instances.
+
* [[Management Console - Logging On|Log on]] to the Management Console and check the dashboard for the connection status of servers and roles.
* Remove the role from the old server.
+
* Remove the ''Client Access Server'' role from the old server.
* Remove the leftovers of the old server in the Dashboard -> INFRASTRUCTURE -> Instance Hosts.
+
* Finally [[Management_Console_-_Infrastructure#Removing_Client_Access_Servers|remove the client access server]] that still exist with the old host name.

Latest revision as of 07:03, 23 September 2024

Single Server Mode

In order to retain a single server mode setup by keeping the Management Server, Instance Host and Client Access Server on a single server, follow the instructions below. If only one of the roles in a single server mode setup should to be moved to another server, refer to corresponding section under Multi Server Mode in this article.

  • The following only applies if MFA has been enabled for some or all system administrators:
    • Log in at the Management Console and disable MFA for all administrators that have it enabled.
      The MFA secret, that is used to generate MFA codes, is stored DPAPI-protected in the management database. When the management database is transferred to a different machine, the secret cannot be decrypted on that machine and manual editing of the database would be required, which should be avoided.
  • Start the MailStore Service Provider Edition Configuration tool on the server that has the Management Server role by double-clicking its desktop icon. On Windows Server Core use the command line prompt to start the executable (default: %PROGRAMFILES%\MailStore Infrastructure\MailStoreInfrastructureConfig.exe.
  • Stop the Client Access Server, Instance Host, and Management Server services.
  • Transfer your MailStore SPE license to the new server through our license portal.
  • Install MailStore Service Provider Edition on the new server and set it up Single Server Mode.
  • Stop the Client Access Server, Instance Host, and Management Server services on the new server.
  • Remove all MailStore SPE related certificates from the server's personal (MY) certificate store of the new server.
    Spe-certificate-store.png
  • Export the SSL certificates and private keys from the old server's certificate store and import them into the same location on the new server.
    • On Windows Server 2016 and newer you can use the following PowerShell command to export all certificats stored in the computers MY store as PFX containers to the current user's desktop. That PowerShell session requires elevated privileges:
      (Get-ChildItem Cert:\LocalMachine\My).Thumbprint | ForEach-Object { Export-PfxCertificate -Cert ("Cert:\LocalMachine\My\{0}" -f $_) -FilePath ("$env:USERPROFILE\Desktop\{0}.pfx" -f $_) -Password  (ConvertTo-SecureString -AsPlainText -Force "not_secure_234") }
    • Windows Server 2016 and newer Powershell command to import the previously exported certificates from the current user's desktop into the new server's certificate store. That PowerShell sessions requires elevated privileges:
      Get-ChildItem -Path $env:USERPROFILE\Desktop\ -Filter *.pfx | Import-PfxCertificate -Exportable -Password  (ConvertTo-SecureString -AsPlainText -Force "not_secure_234") -CertStoreLocation Cert:\LocalMachine\My
  • Remove the %program files%\MailStore Infrastructure\config directory on the new server and replace it with the config directory from the old one.
  • Transfer your instance data directories to the new server. If the instance data on the new server is stored in a different location than on the old one, the Base Directory of the instances must be adjusted accordingly. Refer to Instance Management for further details.
  • When the host name of the server has changed, also follow the instructions in Renaming the Server
  • Start the Management Server service followed by the Instance Host and Client Access Server service.
  • Log on to the Management Console and check the dashboard for the connection status of servers and roles.
  • Re-enable Multi-Factor Authentication for system administrators that had it enabled.
  • Re-enter the SMTP password if it had been set.

Multi Server Mode

Moving the Management Server

  • The following only applies if MFA has been enabled for some or all system administrators:
    • Log in at the Management Console and disable MFA for all administrators that have it enabled.
      The MFA secret, that is used to generate MFA codes, is stored DPAPI-protected in the management database. When the management database is transferred to a different machine, the secret cannot be decrypted on that machine and manual editing of the database would be required, which should be avoided.
  • Start the MailStore Service Provider Edition Configuration tool on the server that has the Management Server role by double-clicking its desktop icon. On Windows Server Core use the command line prompt to start the executable (default: %PROGRAMFILES%\MailStore Infrastructure\MailStoreInfrastructureConfig.exe.
  • Stop the Management Server service.
  • Transfer your MailStore SPE license through our license portal.
  • Install the MailStore Service Provider Edition on the new server and set it up in Multi Server Mode
  • Add the Management Server role on the new server, but do not start it yet.
  • Transfer the file MailStoreManagementDatabase.json from the old server's configuration directory to the same location on the new server. By default, this file resides in %programfiles\MailStore Infrastructure\config%.
  • Start the Management Server service on the new server.
  • Adjust the Management Server setting in the configuration of each Instance Host and Client Access Server by clicking on the corresponding Configure... button in the MailStore Service Provider Edition Configuration tool.
  • Log on to the Management Console and check the dashboard for the connection status of servers and roles.
  • Re-enable Multi-Factor Authentication for system administrators that had it enabled.
  • Re-enter the SMTP password if it had been set.

Moving an Instance Host

  • Start the MailStore Service Provider Edition Configuration tool on a server that is a Instance Host by double-clicking it's desktop icon. On Windows Server Core use the command line prompt to start the executable (default: %PROGRAMFILES%\MailStore Infrastructure\MailStoreInfrastructureConfig.exe.
  • Stop the Instance Host service.
  • Install MailStore Service Provider Edition on the new server and set it up in Multi Server Mode.
  • Add the Instance Host role.
  • Pair with the Management Server.
  • Start the Instance Host service.
  • Log on to the Management Console and check the dashboard for the connection status of servers and roles.
  • Follow the Moving Instances guide to move the instances to the new instance host.
  • Remove the Instance Host role from the old server.
  • Finally remove the instance host that still exist with the old host name.

Moving a Client Access Server

  • Export the certificates, including their private keys, that are visible to the end users on the old client access server. By default these are MailStoreClientAccessServerHttp and MailStoreClientAccessServerImap, but not MailStoreClientAccessServerTcp.
  • Import these certificates into the new server's personal (MY) certificate store.
  • Start the MailStore Service Provider Edition Configuration tool on a server that is a Client Access Server by double-clicking it's desktop icon. On Windows Server Core use the command line prompt to start the executable (default: %PROGRAMFILES%\MailStore Infrastructure\MailStoreInfrastructureConfig.exe.
  • Stop the Client Access Server service.
  • Install MailStore Service Provider Edition on the new server and set it up in Multi Server Mode.
  • Add the Client Access Server role.
  • Pair with the Management Server.
  • Adjust the certificate settings in the Configure Client Access Server Role dialog to use the imported certificates.
  • Start the Client Access Server service.
  • Log on to the Management Console and check the dashboard for the connection status of servers and roles.
  • Remove the Client Access Server role from the old server.
  • Finally remove the client access server that still exist with the old host name.