How to restore the backup from my database

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

“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.

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?

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!