Moving ThingworxStorage location

    This is a reference document on how to move existing or fresh install ThingworxStorage location.

     

    Note: As of Thingworx 7.0 the platform-settings.json file has changed and therefore the newest version needs to be used  to change the location of the folders. Please refer to this guide pg.45-46 to see the new .json file.http://support.ptc.com/WCMS/files/170230/en/Installing_ThingWorx_7.1.pdf  A sample json is attached at the bottom of this document.

     

    Here are the main bullet points that need to be kept in mind when performing a migration process:

     

    1. ThingworxPlatform directory has to be in the same partition as where the Tomcat is installed. I.e. if your tomcat is in /apps, the ThingworxPlatform should also be in /apps, not in root. Note: if ThingworxPlatform will be placed in a different partition than the tomcat, create a THINGWORX_PLATFORM_SETTINGS environmental variable that will point to the correct location. Refer to the Installation Guide for details.
    2. Before modifying the location of the platform-settings.json, stop tomcat. There is no need to undeploy the Thingworx app, but do rename the existing folders (as a way of copying/preserving data if any exists) “ThingworxStorage” to “ThingworxStorageCopy” and “ThingworxBackupStorage” to “ThingworxBackupStorageCopy”. If this is a fresh install, proceed to step 3..
    3. Modify the platform-settings.json to have desired locations for the ThingworxStorage folders.
    4. Start the tomcat. New ThingworxStorage and ThingworxBackupStorage will be created in the new location.

    Note: if there is any data in the ThingworxStorage (see ThingworxStorageCopy and ThingworxBackupStorageCopy from step 2), stop the tomcat and place the contents of the original folders into the new ones or just replace the directories.

     

    For Postgresql  scenarios:

     

    Ensure postgresql database is running. If fresh install/no need to preserve data,  and in case of 401 error, clean the existing database via the script and run the two scripts to install and setup DB and Schema. Start tomcat and verify connection.

     

    If data does need to be preserved, then run the schema update script to update from 6.5 to 6.6. then to 7.0 and 7.1 respectively, depending on which version you are starting with.

     

    To change the location of where postgresql would write data, find the thingworxPostgresDBSetup.sh script open it to edit:

     

    tablespace_location="/ThingworxPostgresqlStorage"

     

     

    Then re-run the DBsetup and Schema setup while tomcat is stopped.

     

    For assistance in resolving any difficulties related to the migration process, please contact Thingworx Technical Support.