# Disk usage Influxdb 2.2 with mapping to influxql

**URL:** <https://community.influxdata.com/t/disk-usage-influxdb-2-2-with-mapping-to-influxql/25206>\
**Category:** InfluxDB 2\
**Tags:** influxdb, influxql\
**Created:** [May 30, 2022, 6:17am UTC](https://community.influxdata.com/t/disk-usage-influxdb-2-2-with-mapping-to-influxql/25206 "2022-05-30T06:17:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![christian\_m](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@christian\_m](https://community.influxdata.com/u/christian_m)\
**Post date:** [May 30, 2022, 6:17am UTC](https://community.influxdata.com/t/disk-usage-influxdb-2-2-with-mapping-to-influxql/25206/1 "2022-05-30T06:17:07Z")

</div>

hello everyone

I have a question about my influxdb database.  
First of all, when I set up my system (raspberry 4), I immediately installed version 2.2. For a simple, preset query in Grafana, I mapped the bucket and retention policy to influxql using this guide:  
[https://docs.influxdata.com/influxdb/v2.0/query-data/influxql/?t=InfluxDB+API](https://docs.influxdata.com/influxdb/v2.0/query-data/influxql/?t=InfluxDB+API)

I initially set the retention period to one year in the iobroker settings for the Influx adapter. Then I put the database on a USB drive, according to these instructions (last post):  
[https://community.influxdata.com/t/influxdb-2-0-moving-database/20452/5](https://community.influxdata.com/t/influxdb-2-0-moving-database/20452/5)

Works well. Now I have noticed that the database has a relatively high storage requirement: 800 mb per week with approx. 30 data points from the smart home (e.g. climate, electricity data). Is that size normal?

Now I have reduced the retention period (“delete after” in bucket settings in the new graphical interface of influx) to one month.  
As expected, data older than one month can no longer be queried in grafana, but no storage space was released on the usb drive.

Can anyone tell me about this issue? maybe it has something to do with the mapping?  
Apart from that: what happens with these “saw teeth” in normal operation? why is a little storage space suddenly released again and again?

 ![disk space free](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/0/013ebe767eeedef3f18f2e46a292ea27eb1f4fd7.jpeg)

---

<div class="post-metadata">

**Author:** ![Philippe\_Branly](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/philippe_branly/32/7315_2.png) [@Philippe\_Branly](https://community.influxdata.com/u/Philippe_Branly)\
**Post date:** [May 30, 2022, 11:19am UTC](https://community.influxdata.com/t/disk-usage-influxdb-2-2-with-mapping-to-influxql/25206/2 "2022-05-30T11:19:54Z")

</div>

Hi I had quite the same issue .  
I could fix the issue by performing a backup then a restore —full.  
From a 1Go SSD I had 30% used then only 4 % after the restore  
Phil

---

<div class="post-metadata">

**Author:** ![christian\_m](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@christian\_m](https://community.influxdata.com/u/christian_m)\
**Post date:** [May 31, 2022, 3:58am UTC](https://community.influxdata.com/t/disk-usage-influxdb-2-2-with-mapping-to-influxql/25206/3 "2022-05-31T03:58:59Z")

</div>

Was your backup successful? Which version are you using?  
Unfortunately, the backup always ends with this error for me:

2022/05/31 05:56:40 INFO: Downloading metadata snapshot  
2022/05/31 05:56:40 INFO: Backing up TSM for shard 11  
2022/05/31 05:56:40 WARN: Shard 11 removed during backup  
2022/05/31 05:56:40 INFO: Backing up TSM for shard 13  
2022/05/31 05:56:40 WARN: Shard 13 removed during backup  
2022/05/31 05:56:40 INFO: Backing up TSM for shard 15  
2022/05/31 05:56:40 WARN: Shard 15 removed during backup  
2022/05/31 05:56:40 INFO: Backing up TSM for shard 17  
2022/05/31 05:56:40 WARN: Shard 17 removed during backup  
2022/05/31 05:56:40 INFO: Backing up TSM for shard 19  
2022/05/31 05:56:40 WARN: Shard 19 removed during backup  
2022/05/31 05:56:40 INFO: Backing up TSM for shard 21  
**Error: failed to backup bucket data: failed to download snapshot of shard 21: 500 Internal Server Error: An internal error has occurred - check server logs**

Where I can find these logs?

---

<div class="post-metadata">

**Author:** ![Philippe\_Branly](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/philippe_branly/32/7315_2.png) [@Philippe\_Branly](https://community.influxdata.com/u/Philippe_Branly)\
**Post date:** [May 31, 2022, 11:56am UTC](https://community.influxdata.com/t/disk-usage-influxdb-2-2-with-mapping-to-influxql/25206/4 "2022-05-31T11:56:25Z")

</div>

I use InfluxDB 2.  
And yes all was successful.  
I assume that logs depend upon the type of installation .  
Phil

---

<div class="post-metadata">

**Author:** ![christian\_m](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@christian\_m](https://community.influxdata.com/u/christian_m)\
**Post date:** [June 11, 2022, 5:28am UTC](https://community.influxdata.com/t/disk-usage-influxdb-2-2-with-mapping-to-influxql/25206/5 "2022-06-11T05:28:03Z")

</div>

And after that update the data cleanup with retention policy works?
