# Restore backup from command line

**URL:** <https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715>\
**Category:** General Discussion\
**Created:** [June 14, 2013, 5:49pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715 "2013-06-14T17:49:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [June 14, 2013, 5:49pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/1 "2013-06-14T17:49:19Z")

</div>

Calmetrics is helping us ([guided-wave.com](http://guided-wave.com)) develop a user interface for our hardware using Ignition. I am writing an installer for this software which our customers will use to install Ignition on their system and restore a gateway backup containing the application. My problem is that I don’t want our customer to have to interact with the gateway home page to restore the backup. Is there a way to use gwcmd from within my installer to restore the backup? Or, is there another way I should be installing Ignition and establishing the gateway without having to restore from a backup?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [June 14, 2013, 6:40pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/2 "2013-06-14T18:40:28Z")

</div>

Hi,

There are really only two components that make an Ignition gateway unique: the modules, installed in “user-lib/modules”, and the internal database, which is in “data/db”.

It sounds to me like the best option would be perhaps to use one of the zip packages and your own script or program, instead one of the actual installers. The zip distributions contain all of the standard modules, so if you’re not using anything special, the sequence would just go like this:

1. Unzip package to desired install directory
2. Replace the default “data/db” folder with your own, containing the internal database for the customer.
3. Run install-ignition.bat to register the windows service
4. Run start-ignition.bat to start the service.

If you had special modules, just put them in the module directory before starting the service.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [June 14, 2013, 6:50pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/3 "2013-06-14T18:50:25Z")

</div>

That sounds promising; I will give a try. Thanks!

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [August 16, 2013, 5:09pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/4 "2013-08-16T17:09:39Z")

</div>

I’ve been working on other things and am now looking at this again. I have a couple of other questions about a non-interactive install:

1. Is there a way to install the Ignition license without using the gateway interface?

2. Is there a way to tie licenses to a particular machine to “encourage” customers to not install multiple instances using the same license?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 16, 2013, 5:26pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/5 "2013-08-16T17:26:55Z")

</div>

[quote=“steven.elam”]I’ve been working on other things and am now looking at this again. I have a couple of other questions about a non-interactive install:

1. Is there a way to install the Ignition license without using the gateway interface?

2. Is there a way to tie licenses to a particular machine to “encourage” customers to not install multiple instances using the same license?[/quote]

3. Yes, from the GCU command line.

4. This is already how it works.

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [August 16, 2013, 5:51pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/6 "2013-08-16T17:51:57Z")

</div>

Could you expand on “from the gcu command line”? Is there some documentation on this? gwcmd --help doesn’t show anything about licensing, and launch-gcu simply opens the Gatey Control Utility.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 16, 2013, 5:55pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/7 "2013-08-16T17:55:10Z")

</div>

[inductiveautomation.com/support/ … ghtsub=gcu](http://inductiveautomation.com/support/usermanuals/ignition/gateway_control_utility2.htm?zoom_highlightsub=gcu)

Looks like the -w switch is the closest thing - but it doesn’t work how I thought. You must already have obtained a license.ipl file from the offline activation process… which requires accessing the web interface to get the activation\_request.txt file ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

I’ll ask around…

EDIT: Ok, there’s also the -a switch, which activates a cd-key and gives you the activation\_request.txt, which you can upload to out offline activation site, get an ipl in return, then install using -w.

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [August 16, 2013, 7:02pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/8 "2013-08-16T19:02:02Z")

</div>

I was working with v7.5.6 which didn’t have the -a and -w switches. I have now downloaded v7.5.10 which does. This looks like what I need.

Now I would like to test this, but I’m going to need a CD-key. Who should I talk to about getting one for development purposes? Jim Meisler?

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 16, 2013, 7:41pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/9 "2013-08-16T19:41:51Z")

</div>

Yeah, your sales rep can help you out with getting a key.

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [August 22, 2013, 7:22pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/10 "2013-08-22T19:22:12Z")

</div>

Thanks to Jim M. I now have a CD-key.

Next problem: After installing ignition, creating and starting the service as recommended above, when I go to localhost:8088 in my browser, I get error 404 “The requested resource () is not available”.

The gcu shows that the web server has started but the gateway status never completes (i.e. shows an hourglass).

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 22, 2013, 10:36pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/11 "2013-08-22T22:36:00Z")

</div>

Are there any errors in logs/wrapper.log? If so, please post them here.

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [August 23, 2013, 10:57pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/12 "2013-08-23T22:57:41Z")

</div>

Yes, there are errors:

WARN | wrapper | 2013/08/22 11:16:40 | Unable to write to the configured log directory: logs (The system cannot find the path specified. (0x3))  
WARN | wrapper | 2013/08/22 11:16:40 | The directory does not exist.  
WARN | wrapper | 2013/08/22 11:16:40 | Unable to write to the configured log file: logs\wrapper.log (The system cannot find the path specified. (0x3))  
WARN | wrapper | 2013/08/22 11:16:40 | Falling back to the default file in the current working directory: wrapper.log  
STATUS | wrapper | 2013/08/22 11:16:40 | Ignition Gateway service installed.  
WARN | wrapper | 2013/08/22 11:16:40 | Unable to write to the configured log directory: logs (The system cannot find the path specified. (0x3))  
WARN | wrapper | 2013/08/22 11:16:40 | The directory does not exist.  
WARN | wrapper | 2013/08/22 11:16:40 | Unable to write to the configured log file: logs\wrapper.log (The system cannot find the path specified. (0x3))  
WARN | wrapper | 2013/08/22 11:16:40 | Falling back to the default file in the current working directory: wrapper.log  
STATUS | wrapper | 2013/08/22 11:16:40 | Starting the Ignition Gateway service…  
WARN | wrapper | 2013/08/22 11:16:40 | Unable to write to the configured log directory: logs (The system cannot find the path specified. (0x3))  
WARN | wrapper | 2013/08/22 11:16:40 | The directory does not exist.  
WARN | wrapper | 2013/08/22 11:16:40 | Unable to write to the configured log file: logs\wrapper.log (The system cannot find the path specified. (0x3))  
WARN | wrapper | 2013/08/22 11:16:40 | Falling back to the default file in the current working directory: wrapper.log  
STATUS | wrapper | 2013/08/22 11:16:40 | --\> Wrapper Started as Service  
STATUS | wrapper | 2013/08/22 11:16:40 | Java Service Wrapper Standard Edition 64-bit 3.5.15  
STATUS | wrapper | 2013/08/22 11:16:40 | Copyright © 1999-2012 Tanuki Software, Ltd. All Rights Reserved.  
STATUS | wrapper | 2013/08/22 11:16:40 | [wrapper.tanukisoftware.com](http://wrapper.tanukisoftware.com)  
STATUS | wrapper | 2013/08/22 11:16:40 | Licensed to Inductive Automation for Ignition Gateway  
STATUS | wrapper | 2013/08/22 11:16:41 |  
STATUS | wrapper | 2013/08/22 11:16:41 | Launching a JVM…  
INFO | jvm 1 | 2013/08/22 11:16:41 | WrapperManager: Initializing…  
INFO | jvm 1 | 2013/08/22 11:16:43 | Aug 22, 2013 11:16:43 AM org.apache.catalina.startup.Embedded start  
INFO | jvm 1 | 2013/08/22 11:16:43 | INFO: Starting tomcat server  
INFO | jvm 1 | 2013/08/22 11:16:43 | Aug 22, 2013 11:16:43 AM org.apache.catalina.core.StandardEngine start  
INFO | jvm 1 | 2013/08/22 11:16:43 | INFO: Starting Servlet Engine: Apache Tomcat/6.0.18  
INFO | jvm 1 | 2013/08/22 11:16:43 | Aug 22, 2013 11:16:43 AM org.apache.catalina.startup.DigesterFactory register  
INFO | jvm 1 | 2013/08/22 11:16:43 | WARNING: Could not get url for /javax/servlet/jsp/resources/jsp\_2\_0.xsd  
INFO | jvm 1 | 2013/08/22 11:16:43 | Aug 22, 2013 11:16:43 AM org.apache.catalina.startup.DigesterFactory register  
INFO | jvm 1 | 2013/08/22 11:16:43 | WARNING: Could not get url for /javax/servlet/jsp/resources/jsp\_2\_1.xsd  
INFO | jvm 1 | 2013/08/22 11:16:43 | Aug 22, 2013 11:16:43 AM org.apache.catalina.startup.DigesterFactory register  
INFO | jvm 1 | 2013/08/22 11:16:43 | WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary\_1\_1.dtd  
INFO | jvm 1 | 2013/08/22 11:16:43 | Aug 22, 2013 11:16:43 AM org.apache.catalina.startup.DigesterFactory register  
INFO | jvm 1 | 2013/08/22 11:16:43 | WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary\_1\_2.dtd  
INFO | jvm 1 | 2013/08/22 11:16:43 | Aug 22, 2013 11:16:43 AM org.apache.catalina.startup.DigesterFactory register  
INFO | jvm 1 | 2013/08/22 11:16:43 | WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary\_2\_0.xsd  
INFO | jvm 1 | 2013/08/22 11:16:43 | Aug 22, 2013 11:16:43 AM org.apache.catalina.startup.DigesterFactory register  
INFO | jvm 1 | 2013/08/22 11:16:43 | WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary\_2\_1.xsd  
INFO | jvm 1 | 2013/08/22 11:16:45 | Aug 22, 2013 11:16:45 AM org.apache.catalina.core.StandardContext filterStart  
INFO | jvm 1 | 2013/08/22 11:16:45 | SEVERE: Exception starting filter WicketFilter  
INFO | jvm 1 | 2013/08/22 11:16:45 | javax.servlet.ServletException: Unable to start up context. Context temp folder “temp” does not exist.  
INFO | jvm 1 | 2013/08/22 11:16:45 | at com.inductiveautomation.ignition.gateway.bootstrap.SRFilter.init(SRFilter.java:52)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.apache.catalina.startup.Embedded.start(Embedded.java:825)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at com.inductiveautomation.catapult.CatapultBase.startTomcat(CatapultBase.java:206)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at com.inductiveautomation.catapult.Catapult.main(Catapult.java:80)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at java.lang.reflect.Method.invoke(Unknown Source)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:290)  
INFO | jvm 1 | 2013/08/22 11:16:45 | at java.lang.Thread.run(Unknown Source)  
INFO | jvm 1 | 2013/08/22 11:16:45 | Aug 22, 2013 11:16:45 AM org.apache.catalina.core.StandardContext start  
INFO | jvm 1 | 2013/08/22 11:16:45 | SEVERE: Error filterStart  
INFO | jvm 1 | 2013/08/22 11:16:45 | Aug 22, 2013 11:16:45 AM org.apache.catalina.core.StandardContext start  
INFO | jvm 1 | 2013/08/22 11:16:45 | SEVERE: Context [/main] startup failed due to previous errors  
INFO | jvm 1 | 2013/08/22 11:16:45 | Aug 22, 2013 11:16:45 AM org.apache.coyote.http11.Http11Protocol init  
INFO | jvm 1 | 2013/08/22 11:16:45 | INFO: Initializing Coyote HTTP/1.1 on http-8088  
INFO | jvm 1 | 2013/08/22 11:16:45 | Aug 22, 2013 11:16:45 AM org.apache.coyote.http11.Http11Protocol start  
INFO | jvm 1 | 2013/08/22 11:16:45 | INFO: Starting Coyote HTTP/1.1 on http-8088  
STATUS | wrapper | 2013/08/22 11:16:45 | Ignition Gateway started.  
INFO | jvm 1 | 2013/08/22 11:16:47 | Aug 22, 2013 11:16:47 AM org.apache.coyote.http11.Http11Protocol init  
INFO | jvm 1 | 2013/08/22 11:16:47 | INFO: Initializing Coyote HTTP/1.1 on http-8043  
INFO | jvm 1 | 2013/08/22 11:16:47 | Aug 22, 2013 11:16:47 AM org.apache.coyote.http11.Http11Protocol start  
INFO | jvm 1 | 2013/08/22 11:16:47 | INFO: Starting Coyote HTTP/1.1 on http-8043  
INFO | jvm 1 | 2013/08/22 12:20:41 | Received GetMainContextDetailsRequest…  
INFO | jvm 1 | 2013/08/22 12:20:41 | …returning GetMainContextDetailsResponse (0ms)  
INFO | jvm 1 | 2013/08/22 12:20:43 | Uncaught exception during getContextState():java.lang.NullPointerException

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [August 23, 2013, 11:11pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/13 "2013-08-23T23:11:44Z")

</div>

I see two things:

1. The wrapper wants to write to logs/wrapper.log but the logs directory does not exist (an annoyance)

2. A “temp” directory does not exist causing the WicketFilter to fail.

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [August 23, 2013, 11:17pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/14 "2013-08-23T23:17:48Z")

</div>

Remember, I’m installing a zipped build of ignition, i.e. not using the installer. Do these directories need to be added to the zip?

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 26, 2013, 2:32pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/15 "2013-08-26T14:32:23Z")

</div>

For some reason, your zip does not have a logs folder or a temp folder. If you create them both within your unzipped folder, everything should fire up. Do you still have the downloaded zip? If so, can you confirm that it does not have these folders? I looked at a Windows 32-bit 7.5.10 zip and the folders appear to be there within the zip.

---

<div class="post-metadata">

**Author:** ![steven.elam](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.elam/32/4797_2.png) [@steven.elam](https://forum.inductiveautomation.com/u/steven.elam)\
**Post date:** [August 26, 2013, 4:49pm UTC](https://forum.inductiveautomation.com/t/restore-backup-from-command-line/6715/16 "2013-08-26T16:49:24Z")

</div>

The empty directories logs and temp exist in the zip file, but my third-party installation software was failing to unzip them. ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:") I have fixed this by re-creating these directories after the zip file has been processed and before starting ignition.
