Restore Backup with gwcmd

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.

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

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

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’)

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.

Thanks for all your help

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

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?

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?

I am on 7.9.10 and I am the administrator

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

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

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

@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…

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.