# How to restore the backup from my database

**URL:** <https://community.influxdata.com/t/how-to-restore-the-backup-from-my-database/31278>\
**Category:** InfluxDB 1\
**Tags:** backup\
**Created:** [August 24, 2023, 6:27pm UTC](https://community.influxdata.com/t/how-to-restore-the-backup-from-my-database/31278 "2023-08-24T18:27:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeroendevries82](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@jeroendevries82](https://community.influxdata.com/u/jeroendevries82)\
**Post date:** [August 24, 2023, 6:27pm UTC](https://community.influxdata.com/t/how-to-restore-the-backup-from-my-database/31278/1 "2023-08-24T18:27:27Z")

</div>

Hi Guys,

I’m new around here. I’m using Influx on my home automation system Openhab. I made a backup and im not able to restore it.

this is the version i’m using:

` influxd version InfluxDB v1.8.10 (git: 1.8 688e697c51fd)`

The backup is generated with this command:  
`influxd backup -db openhabdb /var/lib/openhab/backups/1-2-2021.bck`

now i’m trying to restore the backup but it doesn’t. It gives me this error:  
`sudo influxd restore -db openhabdb -datadir /var/lib/influxdb/data/ /var/lib/openhab/backups/db.bck 2023/08/24 20:24:35 Restoring offline from backup /var/lib/openhab/backups/db.bck/openhabdb.* restore: open /var/lib/influxdb/data/openhabdb/autogen/1/000000001-000000045.tsm.tmp: read-only file system`

I really don’t know what to do and never guessed a restore was this hard. Can someone help me with this problem?

Kind regards,

Jeroen de Vries

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)\
**Post date:** [August 24, 2023, 6:45pm UTC](https://community.influxdata.com/t/how-to-restore-the-backup-from-my-database/31278/2 "2023-08-24T18:45:19Z")

</div>

“i’m trying to restore the backup but it doesn’t. It gives me this error:”

“read-only file system”

Well, this is not an InfluxDB problem. You are asking the respore process to  
write to a read-only file system.

_Why_ it is read-only, we can only guess at:

a) maybe it got deliberately mounted read-only and needs to be remouunted  
read-write in order to write to it

b) maybe the system detected file system corruption and therefore re-mounted it  
read-only to prevent further corruption

c) maybe it’s a remotely-mounted partition and the server is enforcing it to  
be read-only

there may be further potential reasons I haven’t thought of, but this is not  
an InfluxDB problem. Try restoring to a writeable file system and it should  
work.

Antony.

---

<div class="post-metadata">

**Author:** ![jeroendevries82](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@jeroendevries82](https://community.influxdata.com/u/jeroendevries82)\
**Post date:** [August 24, 2023, 7:25pm UTC](https://community.influxdata.com/t/how-to-restore-the-backup-from-my-database/31278/3 "2023-08-24T19:25:29Z")

</div>

that makes sense! thnx for your reply. i’m not the best with linux, but it’s what i have to work with haha.

I thought I did something wrong with the syntax but it’s the filesystem… Not sure how to remount it and what will that do with openhabian? but maybe I have to ask that question on the openhabian forum?

---

<div class="post-metadata">

**Author:** ![jeroendevries82](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@jeroendevries82](https://community.influxdata.com/u/jeroendevries82)\
**Post date:** [August 25, 2023, 5:44am UTC](https://community.influxdata.com/t/how-to-restore-the-backup-from-my-database/31278/4 "2023-08-25T05:44:15Z")

</div>

this topic can be closed. The problem was the use of ZRAM, openhabian uses ZRAM and for that reason influx was on a read only mount. Problem is solved now.

Thnx for the help!
