# Lost measurements after restoring a database from backup

**URL:** <https://community.influxdata.com/t/lost-measurements-after-restoring-a-database-from-backup/5195>\
**Category:** Systems\
**Tags:** influxdb, backup\
**Created:** [May 16, 2018, 8:48am UTC](https://community.influxdata.com/t/lost-measurements-after-restoring-a-database-from-backup/5195 "2018-05-16T08:48:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![embedonix](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/embedonix/32/1351_2.png) [@embedonix](https://community.influxdata.com/u/embedonix)\
**Post date:** [May 16, 2018, 8:48am UTC](https://community.influxdata.com/t/lost-measurements-after-restoring-a-database-from-backup/5195/1 "2018-05-16T08:48:40Z")

</div>

Hi all,

I hope you can help me out as I can not restore a backed up database and a great deal of my measurements are gone with the wind ☹

I had Influxdb Version ~1.0 on a old PC. I created a backup by this commands:

$backup -database mydb ./bkp

Then the content of this bkp folder are now:  
├── meta.00  
├── mydb.autogen.00110.00  
└── mydb.autogen.00118.00

Then on a new PC with fresh install of influxdb v1.5 I restored this database:

$influxd restore -database mydb -datadir /var/lib/influxdb/data ./bkp/

**The problem:**

I can only see measurements for the last ~24 hours of the measurement…while I had almost 3 weeks of measurements.

Can you please tell me what could have gone wrong? The backup folder is 19MB in size and I think the data should be there but why I can not see the data?

---

<div class="post-metadata">

**Author:** ![Sonia\_Gupta](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/sonia_gupta/32/2349_2.png) [@Sonia\_Gupta](https://community.influxdata.com/u/Sonia_Gupta)\
**Post date:** [May 13, 2019, 8:32pm UTC](https://community.influxdata.com/t/lost-measurements-after-restoring-a-database-from-backup/5195/3 "2019-05-13T20:32:16Z")

</div>

Hi @embedonix, the docs indicate that the offline legacy restore process can result in data loss. I’m not sure if that’s what is happening here, but have you tried restoring with the [-online or -portable flag](https://docs.influxdata.com/influxdb/v1.7/administration/backup_and_restore/#restore)? It looks like those [features are new in 1.5](https://www.influxdata.com/blog/new-features-in-open-source-backup-and-restore/), so it might be worth trying.

---

<div class="post-metadata">

**Author:** ![Sonia\_Gupta](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/sonia_gupta/32/2349_2.png) [@Sonia\_Gupta](https://community.influxdata.com/u/Sonia_Gupta)\
**Post date:** [May 13, 2019, 8:36pm UTC](https://community.influxdata.com/t/lost-measurements-after-restoring-a-database-from-backup/5195/4 "2019-05-13T20:36:55Z")

</div>

Here are the relevant 1.5 docs: [Backing up and restoring in InfluxDB OSS | InfluxDB OSS 1.5 Documentation](https://docs.influxdata.com/influxdb/v1.5/administration/backup_and_restore/#restore-legacy)
