# Purging the config.idb after splitting frontend/backend

**URL:** <https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702>\
**Category:** Ignition\
**Created:** [November 3, 2021, 10:41pm UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702 "2021-11-03T22:41:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 3, 2021, 10:41pm UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/1 "2021-11-03T22:41:47Z")

</div>

I recently split up a gateway into 2 into frontend/backend gateways. It was a few weeks ago now, but I must have just imported the original gateway into both and then deleted stuff from each. I’m guessing that a whole bunch of stuff is still stored inside the config.idb (like tag info in the frontend gateway which shouldn’t be there) because they’re both still ~220MB.

What’s the best method to purge out this config? I presume the answer is going to be to add the modules back and then manually delete the stuff from them to then delete it from the config. (In which case, something learnt for next time: start the gateways from scratch and import stuff in!)

---

<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:** [November 3, 2021, 11:50pm UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/2 "2021-11-03T23:50:20Z")

</div>

You carried these backups over from a 7.9 or earlier system?

You can confirm with [`sqlite_analyzer`](https://www.sqlite.org/sqlanalyze.html) (highly recommend) but it’s extremely likely that the table using almost all of that 220mB is `PROJECT_CHANGES`. That table is completely ignored in 8.0.0+; it _was_ used for the ‘rollback’ feature in the legacy project system.  
If you’ve got sufficient backups of your project(s) and gateway, you can simply drop the table directly. I would probably not do it while the gateway is running, and you can manually run the VACUUM pragma after to recover the emptied space.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 3, 2021, 11:52pm UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/3 "2021-11-03T23:52:39Z")

</div>

Yep, project was upgraded to 8.1.5 from 7.9.x a while back. I’ll have a look, cheers!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 12:10am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/4 "2021-11-04T00:10:04Z")

</div>

I had a look and the table only had 1000 rows. I deleted and vacuumed, and it didn’t change by much at all, still at 224MB. The TAGSCONFIG table has 51k rows in the frontend gateway that doesn’t need to be there, but I assume just deleting the table data would be bad…

---

<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:** [November 4, 2021, 12:24am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/5 "2021-11-04T00:24:20Z")

</div>

`sqlite_analyzer` can give you a breakdown of space consumed per table; that’s going to be more reliable than checking 🙂 Maybe images?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 12:38am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/6 "2021-11-04T00:38:53Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/9/09c5beb631d152a06c10d52ee4367e80c718949f.png)

| PROJECT\_RESOURCES | 173249536 | PROJECT\_RESOURCES | PROJECT\_RESOURCES | 0 | 0 | 15878 | 9790 | 3 | 170751066 | 166214807 | 8961 | 222666 | 62 | 6089 | 163038 | 8764 | 1543252 | 83953 | 0 | 173249536 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| TAGCONFIG | 30819328 | TAGCONFIG | TAGCONFIG | 0 | 0 | 73163 | 51029 | 4 | 25168422 | 7793555 | 2691 | 4454816 | 218 | 22135 | 7744 | 28518 | 4759493 | 105325 | 1 | 30819328 |
| SQLTAGPROP | 6888448 | SQLTAGPROP | SQLTAGPROP | 0 | 0 | 93292 | 87214 | 3 | 6019425 | 597513 | 13 | 467891 | 62 | 6079 | 586 | 8100 | 231747 | 207 | 0 | 6888448 |
| sqlite\_autoindex\_TAGCONFIG\_1 | 5219328 | sqlite\_autoindex\_TAGCONFIG\_1 | TAGCONFIG | 1 | 0 | 51029 | 46457 | 5 | 4749622 | 0 | 0 | 191 | 524 | 4573 | 0 | 30204 | 225176 | 0 | 1 | 5219328 |
| IMAGES | 4337664 | IMAGES | IMAGES | 0 | 0 | 1057 | 636 | 3 | 4190588 | 3881155 | 351 | 591474 | 5 | 422 | 3809 | 1764 | 114221 | 4025 | 0 | 4337664 |
| sqlite\_autoindex\_SQLTAGPROP\_1 | 4331520 | sqlite\_autoindex\_SQLTAGPROP\_1 | SQLTAGPROP | 1 | 0 | 87214 | 83282 | 5 | 3862490 | 0 | 0 | 125 | 297 | 3933 | 0 | 13327 | 143305 | 0 | 1 | 4331520 |
| SQLTAG | 1448960 | SQLTAG | SQLTAG | 0 | 0 | 15627 | 14227 | 3 | 1279083 | 0 | 0 | 181 | 14 | 1401 | 0 | 2976 | 72588 | 0 | 1 | 1448960 |
| TAGCONFIG\_PROVIDERID\_IDX | 439296 | TAGCONFIG\_PROVIDERID\_IDX | TAGCONFIG | 1 | 0 | 51029 | 50608 | 3 | 276994 | 0 | 0 | 7 | 7 | 422 | 0 | 1837 | 2234 | 0 | 1 | 439296 |
| SQLTAGALARMPROP | 355328 | SQLTAGALARMPROP | SQLTAGALARMPROP | 0 | 0 | 6898 | 6556 | 3 | 300385 | 0 | 0 | 409 | 4 | 343 | 0 | 1312 | 14894 | 0 | 1 | 355328 |
| pr\_restype | 219136 | pr\_restype | PROJECT\_RESOURCES | 1 | 0 | 9790 | 9584 | 3 | 184170 | 0 | 0 | 31 | 7 | 207 | 0 | 1427 | 1605 | 0 | 1 | 219136 |
| sqlite\_autoindex\_SQLTAG\_1 | 158720 | sqlite\_autoindex\_SQLTAG\_1 | SQLTAG | 1 | 0 | 14227 | 14077 | 3 | 110763 | 0 | 0 | 8 | 4 | 151 | 0 | 1827 | 1593 | 0 | 1 | 158720 |
| SQLTAG\_OWNERID\_IDX | 137216 | SQLTAG\_OWNERID\_IDX | SQLTAG | 1 | 0 | 14227 | 14097 | 3 | 90454 | 0 | 0 | 8 | 3 | 131 | 0 | 1270 | 1207 | 0 | 1 | 137216 |
| sqlite\_autoindex\_SQLTAGALARMPROP\_1 | 134144 | sqlite\_autoindex\_SQLTAGALARMPROP\_1 | SQLTAGALARMPROP | 1 | 0 | 6556 | 6430 | 3 | 109743 | 0 | 0 | 26 | 4 | 127 | 0 | 1016 | 2149 | 0 | 1 | 134144 |
| sqlite\_autoindex\_PROJECT\_RESOURCES\_1 | 116736 | sqlite\_autoindex\_PROJECT\_RESOURCES\_1 | PROJECT\_RESOURCES | 1 | 0 | 9790 | 9680 | 3 | 83180 | 0 | 0 | 9 | 3 | 111 | 0 | 1324 | 1498 | 0 | 1 | 116736 |
| PROJECT\_RESOURCES\_RESOURCEID\_IDX | 107520 | PROJECT\_RESOURCES\_RESOURCEID\_IDX | PROJECT\_RESOURCES | 1 | 0 | 9790 | 9689 | 3 | 74752 | 0 | 0 | 8 | 3 | 102 | 0 | 1559 | 583 | 0 | 1 | 107520 |
| SQLTAGEVENTSCRIPTS | 60416 | SQLTAGEVENTSCRIPTS | SQLTAGEVENTSCRIPTS | 0 | 0 | 180 | 124 | 2 | 43588 | 887 | 1 | 990 | 1 | 57 | 1 | 564 | 14510 | 133 | 1 | 60416 |

---

<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:** [November 4, 2021, 12:39am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/7 "2021-11-04T00:39:45Z")

</div>

We don’t delete the project resources table after upgrading… but you could.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 12:40am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/8 "2021-11-04T00:40:13Z")

</div>

What is it for? or was it for?

---

<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:** [November 4, 2021, 12:41am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/9 "2021-11-04T00:41:00Z")

</div>

It held… project resources :surprised-pikachu:

They are converted and living on disk now in 8.x.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 12:41am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/10 "2021-11-04T00:41:58Z")

</div>

> [@Kevin.Herron](#):
>
> :surprised-pikachu:

Haha. So _none_ of these are used anymore inside the table?

---

<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:** [November 4, 2021, 12:42am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/11 "2021-11-04T00:42:32Z")

</div>

No, shouldn’t be. On a fresh Ignition 8 the table would either be empty or not exist, not sure which.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 12:43am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/12 "2021-11-04T00:43:16Z")

</div>

Cool, that will free up 165MB 🙂

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 12:57am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/13 "2021-11-04T00:57:03Z")

</div>

I’ve deleted both the PROJECT\_CHANGES and PROJECT\_RESOURCES tables and all seems to be up and running 👍 and my config.idb is now 59MB down from 223MB 🙂

Does deleting a tag provider also delete the tags associated with it? I’m still a bit miffed why the tagsconfig is so big considering I deleted the tag providers and added remote tag providers

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 1:04am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/14 "2021-11-04T01:04:31Z")

</div>

**Backend**  
TAGPROVIDERSETTINGS:

| TAGPROVIDERSETTIGNS\_ID | NAME | PROVIDERID | DESCRIPTION | ENABLED | TYPEID | ALLOWBACKFILL |
| --- | --- | --- | --- | --- | --- | --- |
| 0 | default | 8d3e8257-3c5e-41c7-aa73-9d69eee0ef7a | Default tag provider | 1 | STANDARD | 0 |
| 1 | proj\_name2 | 89ab6acd-53ad-48d5-b13e-e5cac0a22c65 | Tag provider for proj\_name2 project. | 1 | STANDARD | 0 |

TAGCONFIG distinct providerIDs are 0,1,2

**Frontend**

TAGPROVIDERSETTIGNS:

| TAGPROVIDERSETTIGNS\_ID | NAME | PROVIDERID | DESCRIPTION | ENABLED | TYPEID | ALLOWBACKFILL |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | proj\_name2 | 72a4a107-e81a-4972-bfec-ec9c91a48f9e | | 1 | gantagprovider | 0 |
| 2 | default | f18491f7-d1fb-4dfa-8246-422fbaa4731d | | 1 | gantagprovider | 0 |

TAGCONFIG distinct providerIDs are 0,2

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 1:17am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/15 "2021-11-04T01:17:36Z")

</div>

For the frontend, I deleted all TAGCONFIG rows where the PROVIDERID = 0 which provider doesn't exist and used to be the old 'default' provider. Now it's dropped from 59MB to 18MB, much better!

Now to check if it broke anything... doesn't look like it

> [@nminchin](#):
>
> Does deleting a tag provider also delete the tags associated with it? I’m still a bit miffed why the tagsconfig is so big considering I deleted the tag providers and added remote tag providers

Now I'm really interested in the answer to this question

---

<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:** [November 4, 2021, 4:08pm UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/16 "2021-11-04T16:08:51Z")

</div>

The answer appears to be ‘no’; deleting the _provider itself_ doesn’t trigger a deletion of the associated records. It should still be safe to manually delete…but that’s probably something we should fix.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 4, 2021, 7:14pm UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/17 "2021-11-04T19:14:03Z")

</div>

Maybe with a warning that it will also remove all tags

---

<div class="post-metadata">

**Author:** ![hunterdg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hunterdg/32/67774_2.png) [@hunterdg](https://forum.inductiveautomation.com/u/hunterdg)\
**Post date:** [October 25, 2022, 1:56am UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/18 "2022-10-25T01:56:49Z")

</div>

Hello,

Any comments on SQLT\* tables? They're huge in 7.9\>8.1 auto upgrade, but empty when we perform a "Manual" upgrade. Or are we missing something?

"Manual" upgrade consists of 7.9\>8.1 _auto_ upgrade, export everything, wipe/reinstall, import everything.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 25, 2022, 12:31pm UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/19 "2022-10-25T12:31:58Z")

</div>

`sqlt_*` tables are the historian's recordings. They aren't part of a gateway backup. If you upgrade in place, your upgraded server will simply keep using the existing tables in the database. If you upgrade into a new environment, your history starts over.

History is not part of the upgrade process itself.

---

<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:** [October 25, 2022, 3:20pm UTC](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702/20 "2022-10-25T15:20:22Z")

</div>

The **idb** tables corresponding to 'legacy' tags (`SQLTAG`, `SQLTAGPROP`) are ignored in versions \>= 8.X and slated for deletion in a future version.

The `SQLTH_X` tables generated in your RDBMS are subject to your own migration concerns.

[Next page](https://forum.inductiveautomation.com/t/purging-the-config-idb-after-splitting-frontend-backend/52702.md?page=2)
