# Restore Backup with gwcmd

**URL:** <https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666>\
**Category:** Ignition\
**Created:** [February 2, 2022, 4:33pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666 "2022-02-02T16:33:02Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [February 2, 2022, 4:33pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/1 "2022-02-02T16:33:02Z")

</div>

Can someone please give me the correct syntax for the restore command using gwcmd?

I have tried several and it always comes back with “The system cannot find the path specified”

I’m running the Command prompt as Administrator. This is the first part of the prompt:  
C:\program files\Inductive Automation\Ignition

My backup file is on drive e:\IgnitionGatewayBackups\Ignition-backup-20220131-0115.gwbk

I can do a directory on drive e: and the backup is there.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 2, 2022, 4:34pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/2 "2022-02-02T16:34:22Z")

</div>

`gwcmd --restore "e:\IgnitionGatewayBackups\Ignition-backup-20220131-0115.gwbk"`  
Should be all you need.

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [February 2, 2022, 4:37pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/3 "2022-02-02T16:37:52Z")

</div>

I still get the same error could something be wrong with the gwcmd file? It show that it is there.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 2, 2022, 4:42pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/4 "2022-02-02T16:42:35Z")

</div>

Can you show a screenshot of exactly what you’re invoking and where?  
Can you (temporarily) copy the backup from `E:` onto `C:` somewhere and try again?  
Are you completely sure of the path? (Shift + Right Click the file in Explorer and you can ‘Copy As Path’)

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [February 2, 2022, 4:56pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/5 "2022-02-02T16:56:34Z")

</div>

Heres a screen shot.

I did trying moving it to c: drive in my work forlder still same error.

I also did the file explorer and used copy as path that is the last line displayed same error.

 ![File path error](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/354c7351d8faf7dd8019d5e0cfbde08e8f451320.jpeg)

Thanks for all your help

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 2, 2022, 5:12pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/6 "2022-02-02T17:12:23Z")

</div>

Try specifying `gwcmd.bat`, or double check that `gwcmd` is in fact there?

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [February 2, 2022, 5:14pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/7 "2022-02-02T17:14:33Z")

</div>

For some reason my gwcmd.bat is pointing to  
@echo off  
set CURRENTDIR=%CD%  
set IGNITION\_DIR=“C:\Program Files\Inductive Automation\Ignition”  
set JAVA\_CMD=“C:/Program Files/Java/jre1.8.0\_201/bin/java.exe”  
cd %IGNITION\_DIR%  
%JAVA\_CMD% -classpath ".;lib/_" com.inductiveautomation.catapult.control.HeadlessControlUtil dataDir=data currentdir="%CURRENTDIR%" %_  
cd %CURRENTDIR%  
But my jave is at jre1.8.0\_221 so Im sure this is why is always fails the file path but I can’t edit my gwcmd.bat file?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 2, 2022, 5:18pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/8 "2022-02-02T17:18:17Z")

</div>

Hmm, you might need to be an admin to edit the file but you should be able to. I assume you’re on 7.9.X?

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [February 2, 2022, 5:19pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/9 "2022-02-02T17:19:00Z")

</div>

I am on 7.9.10 and I am the administrator

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [February 2, 2022, 5:21pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/10 "2022-02-02T17:21:29Z")

</div>

> [@dcamp1](#):
>
> @echo off

Remove the @ and you will see where the error occurs...

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [February 2, 2022, 6:05pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/11 "2022-02-02T18:05:22Z")

</div>

I did remove the @ and it appears to stop at the next line but I’m not for sure?

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [February 2, 2022, 6:22pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/12 "2022-02-02T18:22:29Z")

</div>

Show the command prompt again… and only the command prompt, not both screens…  
EDIT: I just looked at my gwcmd.bat:

```auto
@echo off
set CURRENTDIR=%CD%
set IGNITION_DIR="C:\Program Files\Inductive Automation\Ignition"
set JAVA_CMD="C:/Program Files/Java/jre-9.0.4/bin/java.exe"
cd %IGNITION_DIR%
%JAVA_CMD% -classpath ".;lib/*" com.inductiveautomation.catapult.control.HeadlessControlUtil dataDir=data currentdir="%CURRENTDIR%" %*
cd %CURRENTDIR%

```

Notice the \* in the `".;lib/*"` and at the end of the line…

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [February 2, 2022, 9:31pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/13 "2022-02-02T21:31:43Z")

</div>

I think I have my problem figured out. (Not solved just yet!)

Our IT/OT department installed “Sentinel-One” on this server and never told me. This is preventing several things from not working as they should. I now have to wait until tomorrow to have them remove this security software before I can then fix my server.

I have ran into this kind of problem with “Sentinel-One” in the past.

I will keep you posted.

Thank for all the help.

---

<div class="post-metadata">

**Author:** ![Mehdi\_MECHEDAL](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@Mehdi\_MECHEDAL](https://forum.inductiveautomation.com/u/Mehdi_MECHEDAL)\
**Post date:** [January 2, 2025, 7:57pm UTC](https://forum.inductiveautomation.com/t/restore-backup-with-gwcmd/55666/14 "2025-01-02T19:57:58Z")

</div>

I got the same problem, any solution ?
