# Data lost after upgrade?

**URL:** <https://community.influxdata.com/t/data-lost-after-upgrade/21686>\
**Category:** InfluxDB 2\
**Created:** [September 13, 2021, 6:36pm UTC](https://community.influxdata.com/t/data-lost-after-upgrade/21686 "2021-09-13T18:36:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![medavoc139](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@medavoc139](https://community.influxdata.com/u/medavoc139)\
**Post date:** [September 13, 2021, 6:36pm UTC](https://community.influxdata.com/t/data-lost-after-upgrade/21686/1 "2021-09-13T18:36:46Z")

</div>

Hey there! I’ve setup a testsystem to evaluate migrating from mariadb for my iot data (iobroker) to influxdb

It’s a linux mint machine (ubuntu based) and I’ve installed influxdb via this repository:

```auto
# cat /etc/apt/sources.list.d/influxdb.list  
deb https://repos.influxdata.com/ubuntu focal stable

```

I’ve had some problems on the system which caused most paths to be read only for a few days.

Now after I’ve sorted that out (without any files having been lost) and I’ve updated all packages and restarted influxdb the localhost:8086 page gave me the freshly installed setup page instead of the testdata I’ve assembled over the last weeks. The organisations and buckets and measurements I’ve collected are not visible anymore.

I still can see lot’s of data files with last modified date between 21st August and 10th of September here: `/var/lib/influxdb/.influxdbv2/engine/data/*/autogen/*/*.tsm`

It seems after the upgrade, the influxdb now uses `/var/lib/influxdb/engine/` instead of `/var/lib/influxdb/.influxdbv2/engine/`.

How can I get back to my previous dataset that’s at `/var/lib/influxdb/.influxdbv2/engine/`?

---

<div class="post-metadata">

**Author:** ![medavoc139](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@medavoc139](https://community.influxdata.com/u/medavoc139)\
**Post date:** [September 13, 2021, 6:43pm UTC](https://community.influxdata.com/t/data-lost-after-upgrade/21686/2 "2021-09-13T18:43:50Z")

</div>

this solved my issue:

```auto
service influxdb stop
cd /var/lib/influxdb/
mkdir new_empty
mv -n engine new_empty/
mv -n influxd.bolt new_empty/
mv -n .influxdbv2/* .
service influxdb start

```

Those directories looked like this before I rearanged them:

```auto
# ls -alih /var/lib/influxdb/
total 120K
 13162 drwxr-xr-x 1 influxdb influxdb 114 Sep 13 17:59 .
   545 drwxr-xr-x 1 root root 1,3K Aug 18 08:02 ..
 13223 drwxr-xr-x 1 influxdb influxdb 18 Jul 23 12:55 .cache
 13165 drwxr-xr-x 1 influxdb influxdb 34 Jul 22 23:31 data
537374 drwxr-xr-x 1 influxdb influxdb 14 Sep 13 17:54 engine
537373 -rw------- 1 influxdb influxdb 128K Sep 13 17:59 influxd.bolt
 13225 drwx------ 1 influxdb influxdb 36 Jul 23 12:55 .influxdbv2
584702 -rw-r--r-- 1 influxdb influxdb 8 Sep 13 17:59 influxd.pid
 13163 drwxr-xr-x 1 influxdb influxdb 14 Jul 23 01:32 meta
 13212 drwx------ 1 influxdb influxdb 34 Jul 22 23:31 wal

```

```auto
# ls -alih /var/lib/influxdb/.influxdbv2/
total 148K
13225 drwx------ 1 influxdb influxdb 36 Jul 23 12:55 .
13162 drwxr-xr-x 1 influxdb influxdb 114 Sep 13 17:59 ..
13227 drwxr-xr-x 1 influxdb influxdb 14 Jul 23 12:59 engine
13226 -rw------- 1 influxdb influxdb 256K Sep 10 08:32 influxd.bolt

```

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [September 14, 2021, 5:14pm UTC](https://community.influxdata.com/t/data-lost-after-upgrade/21686/3 "2021-09-14T17:14:32Z")

</div>

@medavoc139 thanks for sharing your solution!!

---

<div class="post-metadata">

**Author:** ![Udo](https://avatars.discourse-cdn.com/v4/letter/u/f4b2a3/32.png) [@Udo](https://community.influxdata.com/u/Udo)\
**Post date:** [August 22, 2022, 3:06pm UTC](https://community.influxdata.com/t/data-lost-after-upgrade/21686/4 "2022-08-22T15:06:24Z")

</div>

made my day! sincere thanks

---

<div class="post-metadata">

**Author:** ![soloardach](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@soloardach](https://community.influxdata.com/u/soloardach)\
**Post date:** [January 13, 2023, 1:10pm UTC](https://community.influxdata.com/t/data-lost-after-upgrade/21686/5 "2023-01-13T13:10:23Z")

</div>

This solved my same problem after upgrade from 2.6.0 to 2.6.1  
Thanks

---

<div class="post-metadata">

**Author:** ![schwnkster99](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/schwnkster99/32/14543_2.png) [@schwnkster99](https://community.influxdata.com/u/schwnkster99)\
**Post date:** [November 2, 2023, 1:09pm UTC](https://community.influxdata.com/t/data-lost-after-upgrade/21686/6 "2023-11-02T13:09:49Z")

</div>

Hi medavoc139,  
Thank you, this solved my Problem after upgrade from 2.7.1 to 2.7.3.

You’re an Hero!!!
