# Node-RED should empty my influxDB "test database" every 7 days

**URL:** https://discourse.nodered.org/t/node-red-should-empty-my-influxdb-test-database-every-7-days/39259
**Category:** General
**Created:** [17 January 2021 10:18 UTC](https://discourse.nodered.org/t/node-red-should-empty-my-influxdb-test-database-every-7-days/39259 "2021-01-17T10:18:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nilsbaurx](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nilsbaurx](https://discourse.nodered.org/u/nilsbaurx)
#### Post date: [17 January 2021 10:18 UTC](https://discourse.nodered.org/t/node-red-should-empty-my-influxdb-test-database-every-7-days/39259/1 "2021-01-17T10:18:53Z")

</div>

Hello all,

Can anyone tell me if it is possible to specify in Node-RED that all records in my database are deleted every 7 days?

kind regards  
nilsbaurx

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [17 January 2021 10:42 UTC](https://discourse.nodered.org/t/node-red-should-empty-my-influxdb-test-database-every-7-days/39259/2 "2021-01-17T10:42:10Z")

</div>

Influx has a built in feature for this. If you write it using a [Retention Policy](https://docs.influxdata.com/influxdb/v1.8/query_language/manage-database/) of 1 week then it will automatically delete data older than that.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [18 March 2021 10:42 UTC](https://discourse.nodered.org/t/node-red-should-empty-my-influxdb-test-database-every-7-days/39259/3 "2021-03-18T10:42:14Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
