# Audit Profile Retention option

**URL:** <https://forum.inductiveautomation.com/t/audit-profile-retention-option/34522>\
**Category:** Ignition Early Access\
**Created:** [May 7, 2020, 1:34pm UTC](https://forum.inductiveautomation.com/t/audit-profile-retention-option/34522 "2020-05-07T13:34:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamad.tayara](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mohamad.tayara](https://forum.inductiveautomation.com/u/mohamad.tayara)\
**Post date:** [May 7, 2020, 1:34pm UTC](https://forum.inductiveautomation.com/t/audit-profile-retention-option/34522/1 "2020-05-07T13:34:16Z")

</div>

Hi,  
I have found that the Audit profile retention option was removed (Ignition 8.0.11), What is the reason for this and is there another alternative to achieve the same goal, ( prune the log table for older records i.e 90 days).  
Thanks in advance

---

<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:** [May 7, 2020, 2:41pm UTC](https://forum.inductiveautomation.com/t/audit-profile-retention-option/34522/2 "2020-05-07T14:41:30Z")

</div>

It’s not available due to a bug, not any intentional removal. You can still manually edit the field - support should be able to guide you through the process. Despite not being visible, pruning is still happening, at whatever age is defined; by default, that’s 90 days.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [March 1, 2021, 10:23pm UTC](https://forum.inductiveautomation.com/t/audit-profile-retention-option/34522/3 "2021-03-01T22:23:45Z")

</div>

Our main server happens to be on 8.1.0 which was before the retention setting was fully exposed in the gateway config, but I can see it if I dump the config.idb:

```auto
CREATE TABLE AUDITPROFILES (
  "AUDITPROFILES_ID" NUMERIC(18,0) NOT NULL,
  "NAME" VARCHAR(4096) NOT NULL,
  "TYPE" VARCHAR(4096) NOT NULL,
  "DESCRIPTION" VARCHAR(4096),
  "RETENTION" INTEGER DEFAULT 90 NOT NULL,
  CONSTRAINT PK_AUDITPROFILES PRIMARY KEY (AUDITPROFILES_ID)
);
INSERT INTO AUDITPROFILES VALUES(2,'default_audit','DATASOURCE',NULL,90);

```

If I shut down the server, tweak that last value to 0, and start it back up, will that properly adjust it to not prune on version 8.1.0? (We intend to upgrade soon, but I need to fix this sooner.)

---

<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:** [March 1, 2021, 10:38pm UTC](https://forum.inductiveautomation.com/t/audit-profile-retention-option/34522/4 "2021-03-01T22:38:37Z")

</div>

Yes. Also, in 8.1.3 _all_ datasource audit profiles (regardless of their prior prune setting) will be automatically set to have pruning _disabled_ (with a new, explicit toggle); you’ll have to manually enable pruning (regardless of the prune age setting) upon upgrade.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [March 2, 2021, 2:03am UTC](https://forum.inductiveautomation.com/t/audit-profile-retention-option/34522/5 "2021-03-02T02:03:26Z")

</div>

Hrm… Tried a RETENTION of 0 on our development server and it just removed all the rows in the entire AUDIT\_EVENTS table. Should it maybe be negative?

---

<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:** [March 2, 2021, 6:19pm UTC](https://forum.inductiveautomation.com/t/audit-profile-retention-option/34522/6 "2021-03-02T18:19:16Z")

</div>

Looking at the logic again, negative won’t work properly either (until 8.1.3, anyways) - I would just set it to a high enough number (e.g., 5 years) that it’s guaranteed not to prune until you are able to upgrade.
