cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

specify location for ThingworxStorage and ThingworxBackupStorage folders

sdertien
5-Regular Member

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 9
paic
12-Amethyst
(To:sdertien)

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

Thanks!

Alessio
15-Moonstone
(To:paic)

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



adam11
7-Bedrock
(To:Alessio)

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

Alessio
15-Moonstone
(To:adam11)

Adam,
thank you for the prompt reply and especially for updating the wiki entry.
Unfortunately, I still can't change those locations.
Could it be a bug maybe? How do I report it?

Thanks,
Alessio



adam11
7-Bedrock
(To:Alessio)

Hi Alessio,

That is unfortunate : (


Which method are you using?



Alessio
15-Moonstone
(To:adam11)

system environment variable set to THINGWORX_PLATFORM_SETTINGS=D:\PTC\ThingWorx
if works now. I was still using the platform-settings.json as described before you updated the wiki.

--- start of old platform-settings.json -<br>{ <br>  "Storage": "D:/PTC/ThingWorx/ThingWorxStorage",<br>  "BackupStorage": "D:/PTC/ThingWorx/ThingWorxBackupStorage"<br>}<br><br>- end of old platform-settings.json -<br><br>while instead the settings must be set deeper in the JSON structure:<br><br>- start of NEW platform-settings.json ---
{
  "Settings": {
    "name": "Settings",
    "description": "Platform Settings",
    "isMultiRow": false,
    "ordinal": 0,
    "rows": [
      {
        "Storage": "D:/PTC/ThingWorx/ThingWorxStorage",
        "BackupStorage": "D:/PTC/ThingWorx/ThingWorxBackupStorage"
      } ],
....



qn
12-Amethyst
12-Amethyst
(To:paic)

Hi, where is the Wiki are you talking about ? Is that the documentation (http://support.ptc.com/cs/help/thingworx_hc/thingworx_6.5_hc/) ?

Thank you

sdertien
5-Regular Member
(To:sdertien)

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:\

qn
12-Amethyst
12-Amethyst
(To:sdertien)

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


Announcements


Top Tags