# Can Internal Historian Data be excluded from Gateway Backup (gwbk)?

**URL:** <https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990>\
**Category:** Ignition\
**Tags:** ignition80, ignition81, database\
**Created:** [May 21, 2021, 2:52pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990 "2021-05-21T14:52:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![shane.m.alexander](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shane.m.alexander/32/38401_2.png) [@shane.m.alexander](https://forum.inductiveautomation.com/u/shane.m.alexander)\
**Post date:** [May 21, 2021, 2:52pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/1 "2021-05-21T14:52:55Z")

</div>

I previously posted this question about six months ago [here](http://forum.inductiveautomation.com/t/gateway-backup-gwbk-file-large-due-to-internal-historian/41854), but did not receive any response.

Is there a way of excluding the internal historian data from gateway backups? Does anyone have a work around? I thought maybe project backups might work but according to the documentation:

> They **do not** include Gateway resources, like database connections, Tag Providers, and Tags.

My goal is that the gateway will auto backup everything needed periodically to a network location and not take up too much space.

---

<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:** [May 21, 2021, 3:40pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/2 "2021-05-21T15:40:00Z")

</div>

@shane.m.alexander, can you share some details on what type of Ignition installation it is? Edge/Full, Version?

---

<div class="post-metadata">

**Author:** ![shane.m.alexander](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shane.m.alexander/32/38401_2.png) [@shane.m.alexander](https://forum.inductiveautomation.com/u/shane.m.alexander)\
**Post date:** [May 21, 2021, 7:42pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/3 "2021-05-21T19:42:22Z")

</div>

Full version: 8.1.4, using Vision, OPC-UA, and Reporting

---

<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:** [May 21, 2021, 7:53pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/4 "2021-05-21T19:53:41Z")

</div>

It looks like Ignition Edge places the internal historian data files under `<Ignition install location>/data/edge_data` and these are not collected by a gateway backup. However, when using the Internal Historian feature against the standard Ignition Full edition, it seems that it places that local SQLite DB in the path you mentioned in your link above, under `data/modules/modules/com.inductiveautomation.taghistorian/InternalHistory.idb`. The `data/modules` path is definitely included in the gateway backup, resulting in your internal history cache coming along for the ride. I’ll open a ticket to look into this…

---

<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:** [May 21, 2021, 7:58pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/5 "2021-05-21T19:58:13Z")

</div>

What modules do you have installed/licensed on the gateway?

---

<div class="post-metadata">

**Author:** ![shane.m.alexander](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shane.m.alexander/32/38401_2.png) [@shane.m.alexander](https://forum.inductiveautomation.com/u/shane.m.alexander)\
**Post date:** [May 24, 2021, 3:27pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/6 "2021-05-24T15:27:41Z")

</div>

We are using Vision, OPC, and Tag Historian for this particular issue.

Our license includes:

- Ignition Platform
- Includes IA OPC Drivers
- Symbol Factory
- Vision Client
- Vision Module Limited
- EAM (Free)
- Tag Historian
- Alarm Notification Module
- Reporting Limited Report
- Reporting Module Limited
- MQTT Transmission

---

<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:** [May 24, 2021, 3:36pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/7 "2021-05-24T15:36:52Z")

</div>

Okay, I’ve logged a ticket for this particular issue… There is an alternative strategy that you could use for this, though with this technique not using the official “internal historian”, it won’t be a candidate for sync’ing the history data over the gateway network (one of the original uses for the internal historian is for Ignition Edge where some local history capture can occur but using EAM Data Sync, it can sync the data to an upstream Gateway Tag Historian). Here are some steps you can consider (though the particulars will likely vary somewhat for your installation):

1. Create a new SQLite Database Connection–the path specified (if not explicit) will be relative to your Ignition installation, so you could choose something like `data/internalhistory.db`.
2. Observe the new History datasource that should show under _Config-\>Tags-\>History_.
3. Migrating tags over to using this history datasource instead of the official “Internal Historian” will allow you to place that internal history database file in a path of your choosing (in step 1).

Granted, the steps above don’t accommodate moving over any of the accumulated history you have already. Additionally, with this technique using a different database structure than the internal history DB, it isn’t as simple as just copying the current `HistoricalData.idb` into place as your new database.

From the looks of it, this should be a relatively easy fix, I’ll try to keep this forum post updated with any progress on our ticket for this.

Hope this helps,

Kevin C.

---

<div class="post-metadata">

**Author:** ![shane.m.alexander](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shane.m.alexander/32/38401_2.png) [@shane.m.alexander](https://forum.inductiveautomation.com/u/shane.m.alexander)\
**Post date:** [May 24, 2021, 3:39pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/8 "2021-05-24T15:39:23Z")

</div>

Thanks for that workaround, Kevin. I will keep an eye out for the fix to the official internal database also.

---

<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:** [June 28, 2021, 3:36pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/9 "2021-06-28T15:36:39Z")

</div>

The [nightly](http://forum.inductiveautomation.com/t/nightly-8-1-changelogs-2021/42410/105) now includes an update to where the local data is stored for both Internal History and Edge Historian. You’ll notice that files for local alarm journal, audit log, and tag history are migrated to a `data/local` directory tree that is excluded from the gateway backup.

---

<div class="post-metadata">

**Author:** ![shane.m.alexander](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shane.m.alexander/32/38401_2.png) [@shane.m.alexander](https://forum.inductiveautomation.com/u/shane.m.alexander)\
**Post date:** [July 12, 2021, 4:33pm UTC](https://forum.inductiveautomation.com/t/can-internal-historian-data-be-excluded-from-gateway-backup-gwbk/46990/10 "2021-07-12T16:33:00Z")

</div>

Thanks Kevin! I’ll test it a bit and let you know if I see any problems.
