Moving OutSystems Hub / Platform Server to a new location on your server

Moving OutSystems Hub / Platform Server to a new location on your server

  
Context:
  • Your server has the OutSystems Platform Server installed in the C: drive, but it is running out of disk space and you have a D: drive which holds a lot of disk space, so you wish to move it there;
  • OutSystems Platform Server 4.0 or above installed;
  • You are using the .NET stack.

Preparing for it

This procedure involves redeploying all the eSpaces in that factory after the installation, and will cause the lost of the Personal Areas (versions deployed by using the Run feature). Make sure that all the developers are aware that changes that were not 1-Click-Published will be lost (i.e. all changes applied by using the Run option will not be saved). Also, considering this will cause downtime, make sure that the developers are aware when you do this intervention.

- Be careful if using this procedure in a production environment! -

Please read all the procedure before starting it.


Make sure you have the necessary files
Before starting the procedure, make sure that you have the necessary files, of the same revision currently installed:
  • OutSystems Hub Server installer;
  • (optional) OutSystems Service Studio installer (if you wish to move it too);
  • (optional) OutSystems Integration Studio installer (if you wish to move it too);

Create an all-content solution
Before starting the procedure, we recommend that you create an all-content solution with all the eSpaces and extensions in the factory, to ease the redeployment stage. To do this, follow these instructions:
  1. Access Service Center, navigate to Factory | Solutions;
  2. Create a new solution;
  3. Add all the components of the factory to the solution, in the Components tab. To ease up the task, insert a dot (.) in the Associate Components to Solutions field and choose components from the drop-down that shows up. Remember to check the include dependencies checkbox, to minimize the number of times you need to do this. Select 4 or 5 components at a time and press Associate. Repeat this until no more options appear.
  4. Press the Create version button. Choose a name for it, and press Save.
  5. Your solution is created. This is the solution with the versions that will be redeployed.

Back up your database!
In case you do something wrong with the database, you need this to roll back. Don't say you did not get warned...

Moving the Platform Server
The procedure to actually move the Platform Server should be:
  1. Stop all the OutSystems Services;
  2. Make a backup copy of files server.hsconf and of all files *.exe.config found in the Hub Server installation folder;
    New! since 9.0.1 Back-up file private.key as well!
  3. Uninstall the OutSystems Platform Server;
    • (optional) If you wish to move Service Studio to the new location, uninstall and reinstall Service Studio to the new location (e.g. D:\OutSystems\Service Studio);
    • (optional) If you wish to move Integration Studio to the new location, uninstall and reinstall Integration Studio to the new location (e.g. D:\OutSystems\Integration Studio);
  4. Install the OutSystems Platform Server to the new desired location (e.g. D:\OutSystems\Platform Server);
  5. Place the backup copies of server.hsconf and of the *.exe.config files in the new location (e.g. D:\OutSystems\Platform Server);
    New! since 9.0.1 Also put file private.key in the same folder!
  6. In the Windows Services console, disable all 5 OutSystems Services to prevent errors during the next few steps.
     
  7. Run the Configuration Tool, press all the Test Connection buttons and make sure that they don’t give any error; after this, exit the Configuration Tool by pressing Apply and Exit. Do not run Service Center installation.
     
  8. Confirm in the database (OSSYS_PARAMETER table) that all settings with a folder name (column VAL) point to the correct place. If you have multiple front-ends, only update the lines for the correct server (column HOST).
    You can locate the settings which contain folder locations by searching by the old path, e.g.
    select * from ossys_parameter where val like '%C:\Program Files\OutSystems\Platform Server%'

    If you are not comfortable editting values in the database, request help from someone who is.
    If you do something wrong, you will need to restore the database from a backup.

     
  9. In the Windows Services console, set all 5 OutSystems Services to automatic start.
  10. Run the Configuration Tool, press Apply and Exit and wait for Service Center install, After it is complete, you should be able to successfully access Service Center.
  11. Access Service Center with the admin user;
  12. Navigate to Factory | Solutions, choose the solution you created before, and publish the version you created.

After this, the Platform Server is now installed in the new location. Make sure everything is up and running and then you can proceed to erase the previous Hub Server folder.

Please refer to the installation checklist if you have any doubts on any of the steps described.
Hi Acácio,

I'm having exactly this problema, but with 7.0 version.

What I did was:

- Open the configuration tool and export my current configuration
- Uninstalled Platform Server
- Deleted Outsystems folder from c:\program files
- Restart the machine
- Install Platform Server on D:\Outsystems and it did it
- Open Configuration Tool and import the configuration saved before
- Create/update database/session followed by apply
- It asked if I wanted to install Service Center wich I accepted
- A in that step, it created again the folder c:\Program files\Outsystems\Platform Server with several folders
- After that, all my publishing files are saved in c:\Program Files.....

What did I do wrong?

Thanks,

Nelson Freitas
Hi all

For those that have been having issues with this operation, it seems that at some point the procedure above stopped working because of two distinct issues:
> At some point in version 7 some of the settings in the database are no longer updated automatically when you run ConfigurationTool (thanks Nelson!, I did not know how far back this went)
> Since version 9.0.1 it is not enough to just back up server.hsconf; you need to backup private.key as well. This is used to encrypt passwords in server.hsconf.

I will edit the original post with the changes.

Acácio