OH2 Backup-System when Main System fails

i want to change to OH2.

Actually I have installed OH1 in one single directory on my Odroid U3 (like Raspberry Pi) running Ubuntu 14.04 LTS, so when my main System fails, i can simply copy the backuped OH directory to my windows computer, start it from there and all works fine again. Very short downtime.

If i install OH2 with apt-get to my new linux machine and this system fails, how can i quickly set up a new system to get OH2 online again?

My idea was to keep my old Odroid U3 and simply copy over the latest files from my OH2 Backup. So after my new machine is running, i make a fresh ubuntu installation on the Odroid U3, install jave and then keep this device on a save place with my daily backups of all my running machines.

Can someone help my with this problem? I was adviced to use the apt-get installation to install OH2. But isn´t it easier for me to make backups and recovery on a new machine, if i use the single directory installation like i use in OH1?

For a proper OH2 backup you need a copy of:
If you use apt-get (recommended) these are: /etc/openhab2/ and /var/lib/openhab2 folders.

You could go with the manual installation and have everything under /opt/openhab2/ folder but you still need to backup only the conf and the userdata folders.

If you are migrating from OH1 to OH2 you will need to read the http://docs.openhab.org/tutorials/migration.html tutorial.

I’d recommend to make a backup of your SD card.
See this post.
Already to use apt-get or to copy files can (almost) irreversibly change your system, potentially resulting in incompatibilies and more problems.
If your system crashes, just plug in your backup card and you’re back where you started.
You can also have different cards with OH1 and OH2, of course.

I have an ESXi Server with virtual machines running. So no need for SD-Cards any more :slight_smile:

If i can recover the whole linux machine or set up a new linux machine on my ESXi, than that´s no big problem. But if the whole server crashes, i have to use another computer. And in this case, simply copy the whole OH2-Directory to my Windows Notebook would be a easy way to get OH2 running again.

If i use the apt-get installation, i have to copy fresh OH2 installation files from the homepage to the windows machine and then copy my backuped userfiles/config back to the diretorys.

Can i do it this way?