Skip to main content
5-Regular Member
Jun 20, 2014 11:03 AM UTC
Question

specify location for ThingworxStorage and ThingworxBackupStorage folders

I have ThingWorx 5.0 installed on my local Tomcat 7.0 instance running on Windows.

I do not want the ThingworxStorage and ThingworxBackupStorage folders to reside under my C: drive root.
Is there a way to tell Thingworx where to place those folders?

    9 replies

    1-Visitor
    Jun 20, 2014 11:58 AM UTC

    Hello Steve, yes that is possible, please see Wiki entry 2.01.03

    Thanks!

    Translate
    15-Moonstone
    Jul 10, 2014 6:25 AM UTC

    The wiki entry 2.01.03 is not specific enough in my opinion, and is also ambiguous, and if I follow my interpretation of it I cannot succeed in changing that location. I'm using version 5.0.1.103.
    Here are the points of ambiguity:

    How should I interpret 'Define an environment variable that points to the location of the JSON configuration file'? Shall the content of the environment variable point to the location of the JSON file (which to my interpretation means to the folder where the JSON file is located), or to the file itself (that is, in my case, to D:\ThingworxPlatform\platform-settings.json)?
      1. Shall I define a system or a user environment variable?
      2. Must Thingworx.war be undeployed/redeployed after making this change?
      3. The wiki entry does not provide a sample

    Thanks,

    Alessio



    Translate
    5-Regular Member
    Jul 16, 2014 2:28 AM UTC

    Thanks for you input. We've updated the Wiki entry with more detailed information. Please let me know if you have any questions.

    Translate
    sdertien5-Regular MemberAuthor
    5-Regular Member
    Jun 22, 2014 11:42 PM UTC

    Greetings,


    I found the docs on setting an alternate location for the storage and backup storage (thanks).

    I tried to follow the docs and what ever i do, i cannot get ThingWorxStorage or ThingWorxBackupStorage

    to get created in any location other than the root directory (for my case Windows D:\ ).


    What i have done:


    - Created the following directories:

     - D:/svn/projects/twx/ThingWorxStorage

     - D:/svn/projects/twx/ThingWorxBackupStorage



    Before each attempt, i undeployed Thingsworx web app from Tomcat and restarted tomcat server



    Attempt #1

    --


    </p><p>- Created setenv.bat file</p><p>- Added the following set "THINGWORX_PLATFORM_SETTINGS=D:/svn/projects/twx"</p><p>- Created platform-settings.json file</p><p>- added the following to the file</p><p>  {</p><p>  "Storage": "D:/svn/projects/twx/ThingWorxStorage",</p><p>  "BackupStorage": "D:/svn/projects/twx/ThingWorxBackupStorage"</p><p>  }</p><p><br></p><p>Results: ThingworxStorage and ThingworxBackupStorage created on D:\</p><p><br></p><p><br></p><p><br></p><p><br></p><p>Attempt #2 (changed forward slash to backslash)</p><p>
    </p><p>- Created setenv.bat file</p><p>- Added the following set "THINGWORX_PLATFORM_SETTINGS=D:\svn\projects\twx"</p><p>- Created platform-settings.json file</p><p>- added the following to the file</p><p>  {</p><p>  "Storage": "D:\svn\projects\twx\ThingWorxStorage",</p><p>  "BackupStorage": "D:\svn\projects\twx\ThingWorxBackupStorage"</p><p>  }</p><p><br></p><p>Results: ThingworxStorage and ThingworxBackupStorage created on D:\</p><p><br></p><p><br></p><p><br></p><p><br></p><p>Attempt #3 (not sure if Thingworx was expecting to create the ThingworxStorage and ThingworxBackupStorage folders)</p><p>

    </p><p>- Created setenv.bat file</p><p>- Added the following set "THINGWORX_PLATFORM_SETTINGS=D:\svn\projects\twx"</p><p>- Created platform-settings.json file</p><p>- added the following to the file</p><p>  {</p><p>  "Storage": "D:\svn\projects\twx",</p><p>  "BackupStorage": "D:\svn\projects\twx"</p><p>  }</p><p><br></p><p>Results: ThingworxStorage and ThingworxBackupStorage created on D:\</p><p><br></p><p><br></p><p>Attempt #4 (maybe THINGWORX_PLATFORM_SETTINGS is supposed to point to actual config file instead of parent folder)</p><p>

    </p><p>- Created setenv.bat file</p><p>- Added the following set "THINGWORX_PLATFORM_SETTINGS=D:\svn\projects\twx\platform-settings.json"</p><p>- Created platform-settings.json file</p><p>- added the following to the file</p><p>  {</p><p>  "Storage": "D:\svn\projects\twx",</p><p>  "BackupStorage": "D:\svn\projects\twx"</p><p>  }</p><p><br></p><p>Results: ThingworxStorage and ThingworxBackupStorage created on D:\</p><p><br></p><p><br></p><p><br></p><p>Attempt #5 (create THINGWORX_PLATFORM_SETTINGS using "Control Panel\All Control Panel Items\System" </p><p>            Advanced System Settings =&gt; Environment Variables =&gt; New System variable)</p><p>
    --




    - Added the following system env. variable THINGWORX_PLATFORM_SETTINGS with value=D:\svn\projects\twx

    - Created platform-settings.json file

    - added the following to the file

      {

      "Storage": "D:\svn\projects\twx",

      "BackupStorage": "D:\svn\projects\twx"

      }


    Results: ThingworxStorage and ThingworxBackupStorage created on D:\

    Translate
    1-Visitor
    Nov 17, 2015 3:35 PM UTC

    Hi,

    (I'm using Linux so my command lines may be different)

    Did you try to follow this support case: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS197998

    It works for me on Linux:

    - $CATALINA_HOME/bin/setenv.sh: add "export THINGWORX_PLATFORM_SETTINGS=[link_thingworx_directory]"

    - platform-settings.json:

         ...

         "Storage": "/home/[linux_user]/ThingworxStorage",

         "BackupStorage": "/home/[linux_user]/ThingworxBackupStorage"

         ...

    - sudo chown tomcat8:tomcat8 [link_thingworx_directory] /home/[linux_user]/ThingworxStorage /home/[linux_user]/ThingworxBackupStorage

    - sudo chmod 775 [link_thingworx_directory] /home/[linux_user]/ThingworxStorage /home/[linux_user]/ThingworxBackupStorage


    Translate