22 Replies Latest reply on Feb 27, 2017 11:51 AM by polinao RSS
    mludyga Explorer

    Restore files from old Thingwork instance

    Hey guys,

     

    I was working with the trial version from the developer zone. The license got expired a month or two ago and now I got an new. The problem is that I cant use my old files I made. Both instances of Thingworx are the trial edition and the same version (7.2.1-b71). My steps to restore the old files:

    - installed tomcat 8 on a new machine

    - put the war file to the right location

    - run tomcat and stopped it

    - replace the directories in ThingworxStorage with the old one:

    • ThingworxStorage/database
    • ThingworxStorage/exports
    • ThingworxStorage/extensions
    • ThingworxStorage/logs
    • ThingworxStorage/repository

    - start tomcat

     

    after a few seconds tomcat stops. Thingworx is working without problem if I dont replace the directories in ThingworxStorage.

    Does someone has an idea what I made wrong or could do?

      • Re: Restore files from old Thingwork instance
        supandey Collaborator

        Hello Mathias, what sort of DB are you using for your persistence provider? Do you export entities/data to repository, else you can leave the old folders repository, logs, extensions, exports.What to do with database folder would depend on what kind of DB you are using as persistence provider

        • Re: Restore files from old Thingwork instance
          Ankit Gupta Ninja

          Mathias Ludyga, Usually it works forNeo4j and H2 database. It will not work for postgresql database.

          But the recommended way is to take an export of entities with data from old system. Also, list down the name of extensions from old version.

          In new version import all the extensions first then entities and then data.

           

          For the current scenario; I would suggest you to check the tomcat logs and ThingWorx application logs for more specific error.

            • Re: Restore files from old Thingwork instance
              mludyga Explorer

              Hello Ankit,

               

              I hope there is a way without an export of my entities, because I did not export them.

               

              Those are the error logs:

               

              The error log of Thingworx:

               

              2016-11-08 11:49:40.695+0100 [L: ERROR] [O: E.c.t.r.a.ScriptServices] [I: ] [U: Administrator] [S: ] [T: http-nio-80-exec-6] unterminated string literal org.mozilla.javascript.EvaluatorException: unterminated string literal

                at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:64) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.addError(Parser.java:188) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.addError(Parser.java:166) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.addError(Parser.java:162) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.TokenStream.getToken(TokenStream.java:516) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.peekToken(Parser.java:296) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.matchToken(Parser.java:352) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.argumentList(Parser.java:2374) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.memberExprTail(Parser.java:2535) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.memberExpr(Parser.java:2454) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.unaryExpr(Parser.java:2316) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.mulExpr(Parser.java:2241) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.addExpr(Parser.java:2225) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.shiftExpr(Parser.java:2206) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.relExpr(Parser.java:2181) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.eqExpr(Parser.java:2153) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:2142) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:2131) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:2120) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.andExpr(Parser.java:2109) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.orExpr(Parser.java:2098) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.condExpr(Parser.java:2062) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.assignExpr(Parser.java:2033) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.expr(Parser.java:2012) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.nameOrLabel(Parser.java:1765) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.statementHelper(Parser.java:1032) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.statement(Parser.java:901) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.parse(Parser.java:540) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Parser.parse(Parser.java:478) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Context.compileImpl(Context.java:2348) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Context.compileString(Context.java:1335) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at org.mozilla.javascript.Context.compileString(Context.java:1324) ~[custom-rhino-js-5.1.0.jar:1.7R4]

                at com.thingworx.dsl.engine.DSLProcessor.testCompilation(DSLProcessor.java:73) ~[thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

              Wrapped by: java.lang.Exception: unterminated string literal

                at com.thingworx.dsl.engine.DSLProcessor.testCompilation(DSLProcessor.java:87) ~[thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at com.thingworx.resources.admin.ScriptServices.CheckScript(ScriptServices.java:42) ~[thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_101]

                at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_101]

                at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:261) [thingworx-common-7.2.1-b71.jar:na]

                at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:48) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at com.thingworx.entities.helpers.InternalServiceHelper.processServiceRequestDirect(InternalServiceHelper.java:115) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at com.thingworx.entities.helpers.InternalServiceHelper.processAPIServiceRequest(InternalServiceHelper.java:86) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at com.thingworx.entities.ServiceProviderEntity.processAPIServiceRequest(ServiceProviderEntity.java:61) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:2931) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at com.thingworx.webservices.BaseService.service(BaseService.java:327) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.ptc.connected.plm.thingworx.wc.idp.client.filter.MultiWindchillAuthenticationFilter.doFilter(MultiWindchillAuthenticationFilter.java:190) [ptc-identity-provider-authentication-filter-1.3.0-13.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.thingworx.security.contenttype.ContentTypeFilter.doFilter(ContentTypeFilter.java:111) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.thingworx.security.filter.ValidationFilter.doFilter(ValidationFilter.java:22) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.thingworx.security.authentication.AuthenticationFilter.propagateRequest(AuthenticationFilter.java:370) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at com.thingworx.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:150) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.thingworx.security.filter.ClickjackFilter.doFilter(ClickjackFilter.java:32) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.ptc.connected.plm.thingworx.wc.idp.client.filter.IdentityProviderKeyValidationFilter.doFilter(IdentityProviderKeyValidationFilter.java:68) [ptc-identity-provider-authentication-filter-1.3.0-13.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.ptc.connected.plm.thingworx.wc.idp.client.filter.IdentityProviderAuthenticationFilter.doFilter(IdentityProviderAuthenticationFilter.java:65) [ptc-identity-provider-authentication-filter-1.3.0-13.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.thingworx.security.filter.ProhibitIfNotLeaderFilter.doFilter(ProhibitIfNotLeaderFilter.java:119) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at com.thingworx.security.filter.HttpResponseHeadersFilter.doFilter(HttpResponseHeadersFilter.java:52) [thingworx-platform-h2-freemium-7.2.1-b71.jar:na]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.37]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.37]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.37]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.37]

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:8.0.37]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.37]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.37]

                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [catalina.jar:8.0.37]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.37]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) [catalina.jar:8.0.37]

                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100) [tomcat-coyote.jar:8.0.37]

                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687) [tomcat-coyote.jar:8.0.37]

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) [tomcat-coyote.jar:8.0.37]

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) [tomcat-coyote.jar:8.0.37]

                at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_101]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_101]

                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.37]

                at java.lang.Thread.run(Unknown Source) [na:1.8.0_101]

               

               

              and the error log of tomcat:

               

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.37

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Sep 1 2016 10:01:52 UTC

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.37.0

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jre1.8.0_101

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_101-b13

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 8.0

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 8.0

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 8.0

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 8.0\temp

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\logging.properties

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dserver -Dd64

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseNUMA

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseConcMarkSweepGC

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.10 using APR version 1.5.2.

              09-Feb-2017 10:11:11.152 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

              09-Feb-2017 10:11:12.215 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2j  26 Sep 2016)

              09-Feb-2017 10:11:12.527 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]

              09-Feb-2017 10:11:12.715 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

              09-Feb-2017 10:11:12.730 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]

              09-Feb-2017 10:11:12.746 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2044 ms

              09-Feb-2017 10:11:12.793 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina

              09-Feb-2017 10:11:12.793 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.37

              09-Feb-2017 10:11:12.840 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\Thingworx.war

              09-Feb-2017 10:11:17.418 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

                • Re: Restore files from old Thingwork instance
                  jkaczynski-2 Creator

                  Hello Mathias,

                   

                  From what you posted regarding Thingworx logs, there is in the stack trace an information about some extensions. Did you have any extension on the old instance or have any extension on the new one?

                  • Re: Restore files from old Thingwork instance
                    supandey Collaborator

                    H2 does backup automatically, could you check that in your old ThingworxStorageBackup - may be share the directory structure of the folder here. You can try and use that for restoring the data. I've never tried this myself so can't say how exactly you would restore with that back up, but will check this and come back to you. I suppose you can simply re-import the extensions and that should be fine to get back whatever extensions you were using.

                      • Re: Restore files from old Thingwork instance
                        mludyga Explorer

                        ThingworxStorageBackup has just an folder "backup", which contains a lot of H2Backup_xxxxxxxx.zip files. In every zip file is a data.h2.db file.

                        I imported the same extensions and exchanged the data.h2.db file, but it is not working

                          • Re: Restore files from old Thingwork instance
                            supandey Collaborator

                            Just so i understand correctly, so now you have copied over all the data from the backup folder to the database folder in your new installation and with that were you able to start up the ThingWorx instance?

                             

                            Extensions should be imported in the end, in fact if you are able to start ThingWorx instance just check from Import/Export > Manage if by any chance you see the old Extensions, check if they are working as expected, if not simply delete them and then re-import them

                              • Re: Restore files from old Thingwork instance
                                mludyga Explorer

                                Just so i understand correctly, so now you have copied over all the data from the backup folder to the database folder in your new installation and with that were you able to start up the ThingWorx instance?

                                No I'm not, if copy the data.h2.db file to the new instance, my tomcat will stop a few seconds after I started it. If I first import the extensions the same happens.

                                  • Re: Restore files from old Thingwork instance
                                    supandey Collaborator

                                    Did you tried in following sequence :

                                     

                                    1. Remove ThingWorx folder from <tomcatInstallation>\webapps\ (I would even test by undeploying the war completely)

                                    2. Backup your current ThingworxStorage folder, to a different location, then unzip folders from old backup folder and copy them over to the new installation's \ThingworxStorage\database (make sure no file from new installation exist there),

                                    3. Make sure you are not using any other old folders (other than backup folder)

                                    3. Restart Tomcat (deploy war file if that was removed in first step)

                                     

                                    If this still fails please check the catalina log for more detail, may be attach it to this thread too.

                                      • Re: Restore files from old Thingwork instance
                                        mludyga Explorer

                                        To clarify my steps:

                                        I copied the folders ThingworxStorage and ThingworxStorageBackup

                                        - undeployed the war

                                        - unzipped the last backup from the old ThingworxStorageBackup folder and copied in the new thingworxStorage/database folder and deleted all other files in this folder

                                        - copied war file to the webapps and restarted tomcat

                                         

                                        still not work, I got this in my catalina log:

                                         

                                        10-Feb-2017 11:09:56.689 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.37

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Sep 1 2016 10:01:52 UTC

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.37.0

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jre1.8.0_101

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_101-b13

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 8.0

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 8.0

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 8.0

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 8.0\temp

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\logging.properties

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dserver -Dd64

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseNUMA

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseConcMarkSweepGC

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.10 using APR version 1.5.2.

                                        10-Feb-2017 11:09:56.705 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

                                        10-Feb-2017 11:09:57.752 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2j  26 Sep 2016)

                                        10-Feb-2017 11:09:58.048 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]

                                        10-Feb-2017 11:09:58.236 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

                                        10-Feb-2017 11:09:58.236 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]

                                        10-Feb-2017 11:09:58.252 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2347 ms

                                        10-Feb-2017 11:09:58.314 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina

                                        10-Feb-2017 11:09:58.314 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.37

                                        10-Feb-2017 11:09:58.361 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\Thingworx.war

                                        10-Feb-2017 11:10:04.361 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

                          • Re: Restore files from old Thingwork instance
                            psaxena Creator

                            Hi Ankit Gupta and Jakub Kaczynski I would like to know the complete procedure for importing all the entities with their data from one Thingworx instance to another and how to maintain complete backup.

                              • Re: Restore files from old Thingwork instance
                                jkaczynski-2 Creator

                                Hi Priyanshi,

                                 

                                You have plenty of possibilities: Export to File, To ThingworxStorage or SourceControlEntities. Every has its own pros and cons.

                                 

                                1. Export to File - separately exports model and data. Model can be exported to xml or binary form. XML can be read, changed and parsed by external tools, however binary form produces smaller file and is faster.

                                 

                                2. To ThingworxStorage - can be done with data and is placed in the ThingworxStorage/exports.

                                 

                                3. SourceControlEntities - export to SystemRepository, every entity is exported to separate xml file. Most useful when using versioning and source control tools, like Gerrit.

                                 

                                Backup can be maintained using ScheduledSystemBackup System Object.

                                 

                                 

                                More info can be found here: PTC

                                 

                                Regards,

                                J.

                              • Re: Restore files from old Thingwork instance
                                polinao Collaborator

                                I apologize if I'm missing the already provided information here - but do you have an xml/binary export of your entities and data from the original system? If so, the sequence would be the following:

                                 

                                1. Stop tomcat

                                2. Go to the tomcat folder then to "webapps", remove Thingworx.war file and Thingworx folders.

                                3. Go to your hard drive where Thingworx folders are located and, after copying elsewhere, delete ThingworxStorage and ThingworxBackupStorage.

                                4. Place the new Thingworx.war file into the tomcat/webapps directory.

                                5. Start tomcat.

                                6. Login to Thingworx - you should now have a new, clean system.

                                7. Import all of the extensions you had in the old system.

                                8. Import your entities.

                                9. Import data.

                                 

                                 

                                For retrieving data from the scheduledsystembackup - please see this article https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS210212&lang=en_US

                                  • Re: Restore files from old Thingwork instance
                                    mludyga Explorer

                                    I don't have an xml or binary export of my entities. Retrieving the data from the scheduledsystembackup also don't work.

                                     

                                    Is it possible to retrieve a backup from an thingworx instance (Developer Trial Version) that is expired to a new trial version? I found now that in the Thingworx application log:

                                     

                                    2017-02-13 08:37:18.399+0100 [L: ERROR] [O: c.t.p.c.LicenseMonitor] [I: ] [U: SuperUser] [S: ] [T: LicenseMonitor] =================================================================

                                    2017-02-13 08:37:18.399+0100 [L: ERROR] [O: c.t.p.c.LicenseMonitor] [I: ] [U: SuperUser] [S: ] [T: LicenseMonitor] Thingworx Platform License has expired. Shutting down Platform!!!

                                    2017-02-13 08:37:18.399+0100 [L: ERROR] [O: c.t.p.c.LicenseMonitor] [I: ] [U: SuperUser] [S: ] [T: LicenseMonitor] =================================================================

                                    2017-02-13 08:37:18.399+0100 [L: WARN] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: LicenseMonitor] Shutting down the Platform.