OH3 Backup


I’m looking for backup scripts that helps me to backup

  • OH3 specific settings / bindings /rules, things… / add-ons / etc…
  • Grafana database

Thanks a lot.

Regals, René

Maybe the included backup script is what you are looking for?

sudo openhab-cli backup


I always recommend to use the built-in backup command. But of course this does not iclude your grafana environment. This has to be done seperately.

p.s. With OH2.5 I also used Grafana. Since the migration to OH3 I skipped ths an I use the built-in charts. They are sufficient for my needs.


Use openHABian, it has all that builtin (and more).

also Grafana data base?

The whole SD card.

Yes use whole sd card mirroring.

Using a SSD…

It can actually backup any raw device.

1 Like

Do you use a Raspberry at all?

I guess so…

Hi ,
One question .

I started using Openhabian3.2 on RPi3 and had about 30 items, few things maybe one script and did manual backup every day to gdrive. File size was ~450kb and one day IDK what did I do in the mean while , I did another backup and it took a while …since its headless I thought it froze …actually file size was ~13Mb .

Difference in backup is inclusion(existance) of /userdata/persistence/rrd4j/ folder .

Did I do something to include that folder or OH3 did it auto style bcos of some settings/rules/scripts ?

I see it doesnt change (actually read about rrd4j stuff) just curious do i need it and how come it is in backup file.

Thanks .

Without knowing what you did “manually” we can’t say what happened.
Note that the build-in ways to do an openHAB backup ( backup and full backup) will BOTH include the persistence files!

If you are referring to the .rrd files, they are created once in their final size, changes are only done inside, the file save date will change!

Backup was done using openhabian-config , option 50 . Other than that I didnt mess with settings (I think …other than deleting openhabian user ). Only UI tweaking .
My head is full of different things items bindings…its been 30 days of an hour or two a day of getting to know how it really works…so I maybe forgot some change …

My bad it wasnt the .rrd that appeared …its the /conf/scripts/tuya-mqtt/ with its 29mb uncompresed . Im ready for a skiing trip away from screens :crazy_face:

Sorry . Admin can del above posts

Why that? As which user are you logging in now?

As pi , its already setup with some temp sensors reading so I used it to try out OH3 (I actually tried OH1 way back in time but gave up since there was only one thing to use it for) .
I did it using openhabian-config unattended option . And openhabian as user …IDK …just deleted it .
Dont have any issues so far , except when starting oh-config : "cannot create regular file ‘/home/openhabian/.bash_profile’ .
Why do you ask ? Should I ressurect it ?

So you probably started with the OS on your pi and installed over that.
I started with the openhabian image ( note the version# 3.2 is NOT referring to openhabian but to openHAB), because of that I don’t have ‘pi’.

Yes thats 4 yr old sdcard with Jessie as first installation and update to every subseqent iteration of Debian for RPI . I’m lost at all the name changes with PiOS Pithis pithat OHthis OHthat :laughing: just install what I need .
BTW above used option that installed OH3 says “Installation on Other Linux Systems (add openHABian just like any other software)” so you got me lost again :laughing:

You should setup a fresh openHABian on another card then import your config there.