# Ignition in Docker - trouble getting restore backup on startup to work

**URL:** <https://forum.inductiveautomation.com/t/ignition-in-docker-trouble-getting-restore-backup-on-startup-to-work/84535>\
**Category:** Ignition\
**Created:** [January 20, 2024, 9:30pm UTC](https://forum.inductiveautomation.com/t/ignition-in-docker-trouble-getting-restore-backup-on-startup-to-work/84535 "2024-01-20T21:30:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Plenty](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jim\_Plenty](https://forum.inductiveautomation.com/u/Jim_Plenty)\
**Post date:** [January 20, 2024, 9:30pm UTC](https://forum.inductiveautomation.com/t/ignition-in-docker-trouble-getting-restore-backup-on-startup-to-work/84535/1 "2024-01-20T21:30:49Z")

</div>

Hi, I'm fairly new to ignition, and I'm on a project to create an Ignition in Docker deployment for demo purposes.  
I have created a docker compose yaml that creates containers for the ignition and database server, but I would like to run a backup restore on the ignition instance on startup using the -r command.  
I have checked inside the running container that the restore.gwbk file is correctly copied to the //gw-backup folder inside the ignition container, but the restore never seems to run. Our projects aren't installed.  
It does however produce this line in the messages on the terminal when I do docker compose up:  
ignition-1 | init | 2024/01/20 18:48:55 | Parsed restoreFilePath argument; new value: //gw-backup/restore.gwbk

Here's my Docker compose file.  
Does the name of the Ignition instance in the container have to correspond to the name of the Ignition instance in the backup for it to work correctly? Or have I made some other trivial error in the compose file.

```auto
services:
  ignition:
    image: inductiveautomation/ignition:8.1.36
    hostname: ignition
    ports:
      - 9988:8088
    volumes:
      - ignition-data:/usr/local/bin/ignition/data
      - ./gw-backup:/gw-backup
      - ./external-modules/kanoaCore011324.modl:/usr/local/bin/ignition/user-lib/modules/kanoaCore011324.modl
      - ./external-modules/kanoaOps011324.modl:/usr/local/bin/ignition/user-lib/modules/kanoaOps011324.modl
      - ./external-modules/BIJC_Calendar_Component_v1.8.1.modl:/usr/local/bin/ignition/user-lib/modules/BIJC_Calendar_Component_v1.8.1.modl
    networks:
      - ignition
      - backend
    environment:
      IGNITION_EDITION: standard
      GATEWAY_ADMIN_PASSWORD: password
      ACCEPT_IGNITION_EULA: Y
      DISABLE_QUICKSTART: true
    command: >
      -n ignition-gateway
      -r //gw-backup/restore.gwbk
  database:
    image: mcr.microsoft.com/mssql/server:2019-latest
    ports: 
      - 1433:1433
    volumes:
      - database-data:/var/opt/mssql
    networks:
      - backend
    environment:
      ACCEPT_EULA: Y
      MSSQL_SA_PASSWORD: PASSWORD
      MSSQL_PID: Express  
networks:
  ignition:
  backend:
volumes:
  ignition-data:
  database-data:

```

Thanks a lot in advance, it will be great if we can get this to work.

---

<div class="post-metadata">

**Author:** ![Ben\_Eklund](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ben_eklund/32/40758_2.png) [@Ben\_Eklund](https://forum.inductiveautomation.com/u/Ben_Eklund)\
**Post date:** [January 22, 2024, 9:58pm UTC](https://forum.inductiveautomation.com/t/ignition-in-docker-trouble-getting-restore-backup-on-startup-to-work/84535/2 "2024-01-22T21:58:36Z")

</div>

Hi Jim,

You may need to adjust the `./gw-backup:/gw-backup` volume into the format " `-` `v` `/path/to/gateway` `.gwbk:` `/restore` `.gwbk`" where the path to the .gwbk is included to the left of the :, and the right side will be the renamed .gwbk file that -r will be called on.

Please refer to our documentation on Docker Images below:

[https://docs.inductiveautomation.com/display/DOC81/Docker+Image#DockerImage-AutomatingtheRestoreofaGatewayBackup](https://docs.inductiveautomation.com/display/DOC81/Docker+Image#DockerImage-AutomatingtheRestoreofaGatewayBackup)

If you're still experiencing issues with the .yaml, please contact our [support department](https://support.inductiveautomation.com/hc/en-us), and share the logs from the Docker image, and Ignition logs located in `usr/local/bin/ignition/logs`.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [January 23, 2024, 4:28pm UTC](https://forum.inductiveautomation.com/t/ignition-in-docker-trouble-getting-restore-backup-on-startup-to-work/84535/3 "2024-01-23T16:28:18Z")

</div>

> [@Jim\_Plenty](#):
>
> Does the name of the Ignition instance in the container have to correspond to the name of the Ignition instance in the backup for it to work correctly?

No, these names don't have to align. If you're specifying the gateway name via runtime args (`-n ignition-gateway`), it will take precedence over what is in the GWBK.

> [@Jim\_Plenty](#):
>
> Or have I made some other trivial error in the compose file.

Only things I see on first pass are:

- You don't need that extra leading `/` in your `-r /gw-backup/restore.gwbk` arg, though I think it will still work as-is.
- You'll probably need a more complex base `MSSQL_SA_PASSWORD` for the SQL Server container, it usually needs to meet some minimum complexity threshold to start.

Past that, keep in mind that Ignition will only restore that GWBK against an empty volume. So make sure that you do a `docker compose down -v` to stop and **remove** all containers **and** volumes (⚠ WARNING: this will wipe the slate clean for this Compose stack across all defined services/volumes).

---

<div class="post-metadata">

**Author:** ![Jim\_Plenty](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jim\_Plenty](https://forum.inductiveautomation.com/u/Jim_Plenty)\
**Post date:** [January 26, 2024, 11:42pm UTC](https://forum.inductiveautomation.com/t/ignition-in-docker-trouble-getting-restore-backup-on-startup-to-work/84535/4 "2024-01-26T23:42:43Z")

</div>

Thanks for your help Ben!

---

<div class="post-metadata">

**Author:** ![Jim\_Plenty](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jim\_Plenty](https://forum.inductiveautomation.com/u/Jim_Plenty)\
**Post date:** [January 26, 2024, 11:43pm UTC](https://forum.inductiveautomation.com/t/ignition-in-docker-trouble-getting-restore-backup-on-startup-to-work/84535/5 "2024-01-26T23:43:51Z")

</div>

Thanks for your help!
