# Bucket set to "forever" for retention, but data deletes after 5 years

**URL:** <https://community.influxdata.com/t/bucket-set-to-forever-for-retention-but-data-deletes-after-5-years/28880>\
**Category:** InfluxDB 2\
**Created:** [March 2, 2023, 9:18pm UTC](https://community.influxdata.com/t/bucket-set-to-forever-for-retention-but-data-deletes-after-5-years/28880 "2023-03-02T21:18:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![howardtopher](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/howardtopher/32/12813_2.png) [@howardtopher](https://community.influxdata.com/u/howardtopher)\
**Post date:** [March 2, 2023, 9:18pm UTC](https://community.influxdata.com/t/bucket-set-to-forever-for-retention-but-data-deletes-after-5-years/28880/1 "2023-03-02T21:18:17Z")

</div>

I have an issue where data is getting deleted at 5 years, but the bucket is set to “forever” for retention. InfluxDB v2.6.1

The data in question was originally on InfluxDB v1 and migrated over to v2, but this was years ago.

I’ve provided output below to show the bucket list, the v2 dbrp list, and the “show retention policies” from the v1 shell. To summarize, the bucket is set to infinite, the dbrp mapping for the database is set to use the default retention policy, and the default retention policy is set to 0s.

How can I figure out why this data is getting deleted at 5 years? I’m stuck.

```auto
# influx bucket list 
ID Name Retention	Shard group duration	Organization ID Schema Type
*ce28 _monitoring	168h0m0s	24h0m0s *74a5 implicit
*a3ac _tasks 72h0m0s 24h0m0s *74a5 implicit
*014a network infinite	168h0m0s *74a5 implicit

```

```auto
# influx v1 dbrp list 
ID Database	Bucket ID Retention Policy	Default	Organization ID
*0000 network *014a default true	*74a5

VIRTUAL DBRP MAPPINGS (READ-ONLY)
----------------------------------
ID Database	Bucket ID Retention Policy	Default	Organization ID
*ce28 _monitoring	fce28 autogen true	*74a5
*a3ac _tasks *a3ac autogen true	*74a5
*014a network *014a autogen false	*74a5

```

```auto
┏━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ index ┃ name ┃ duration ┃ shardGroupDuration ┃ replicaN ┃ default ┃
┣━━━━━━━╋━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━╋━━━━━━━━━┫
┃ 1┃default ┃0s ┃168h0m0s ┃ 1.0000000000┃ true┃
┃ 2┃autogen ┃0s ┃168h0m0s ┃ 1.0000000000┃ false┃
┣━━━━━━━┻━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━┫
┃ 6 Columns, 2 Rows, Page 1/1┃
┃ Table 1/1, Statement 1/1┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

```

---

<div class="post-metadata">

**Author:** ![syndrael](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/syndrael/32/12702_2.png) [@syndrael](https://community.influxdata.com/u/syndrael)\
**Post date:** [March 3, 2023, 6:52am UTC](https://community.influxdata.com/t/bucket-set-to-forever-for-retention-but-data-deletes-after-5-years/28880/2 "2023-03-03T06:52:50Z")

</div>

Hello,  
Any issue about it on github ? It’s just an idea but may be team project doesn’t know it.  
Regards.
