Backup from gui

Hi all, I started with OH3 and, since we are on Milestone and openhabian was not supporting OH3 when I started, I decided to use docker. Now I’d like to migrate to a standard openhabian installation.
To do this I have to know how OH store data and export them from the volumes to the standard installation. I though it was great to have a tool on the admin webpage to import and export configurations. If it should be possible, for a standard user it was most useful and actually I never need to login SSH and other stuff that scare some people :laughing:

Are you using Docker volumes or mounting host folders into the container?

I use docker volumes.

You have a couple options.

  1. Figure out where on your host file system the Docker volumes are stored. I don’t use Docker volumes so can’t help with that. You should find a conf and userdata folder. You want a copy of both.

  2. Mount a folder from your file system to the container. Then log into the running container using docker exec openhab /bin/bash and run /openhab/runtime/backup. Copy the resultant file to the folder you mounted to the container.

1 Like

Thank you, I didn’t know there are a backup routine with docker. I think I will try to mount a folder and make a cron for regular backup. Is there a mode to execute the backup directly on a specific folder?
Is the correct command
./openhab/runtime/backup /path/to/backup
I think is not difficoult but when I thought for an easy and universal mode is for a basic user (more than me), and a simple web download was great…

First of all, if you are a simple user only somewhat familiar with Linux or Docker, you should be using openHABian which comes with everything set up and configured for you and offers a full system backup service using Amanda. Anything else is going to be much more complicated and require you to know and understand more of how Linux, Docker, and openHAB works.

The only reason that the Docker image has that backup script is because openHAB itself comes with that backup script. When openHAB is just installed using apt or yum, you can run that backup script through openhab-cli.

I don’t use the script so I can’t tell you what, if any, arguments it has. You will have to look at it and see., It’s just a shell script.