Backup und Restore von openHAB 2 auf dem Raspberry Pi

Sicherung von Daten ist ja immer gut. Wenn dann mal die SD-Karte crasht, kann man sein openHAB 2 wieder herstellen. In openHAB 2 ist eine Backup und Restore Funktion integriert.

Backup und Restore von openHAB 2 auf dem Raspberry Pi

Man braucht nur das Backupscript aufrufen:

sudo $OPENHAB_RUNTIME/bin/backup

und das Passwort eingeben:

openhabian@pi-org:/usr/share/openhab2$ sudo $OPENHAB_RUNTIME/bin/backup

[sudo] password for openhabian:

#########################################
       openHAB 2.x.x backup script
#########################################

Using '/etc/openhab2' as conf folder...
Using '/var/lib/openhab2' as userdata folder...
Using '/usr/share/openhab2/runtime' as runtime folder...
Using '/var/lib/openhab2/backups' as backup folder...
Writing to '/var/lib/openhab2/backups/openhab2-backup-19_01_14-17_27_42.zip'...
Making Temporary Directory if it is not already there
Using /tmp/openhab2/backup as TempDir
Copying configuration to temporary folder...
Removing unnecessary files...
Backup Directory is inside userdata, not including in this backup!
Zipping folder...
Removing temporary files...
Success! Backup made in /var/lib/openhab2/backups/openhab2-backup-19_01_14-17_27_42.zip

Schon hat man ein Backuparchive in

/var/lib/openhab2/backups/openhab2-backup-19_01_14-17_27_42.zip

Einfacher geht es nicht.

Dieses ZIP-Archiv auf einen anderen Datenträger sichern, das ist schon alles. Hier noch weitere Optionen:

openhabian@pi-org:/usr/share/openhab2$ $OPENHAB_RUNTIME/bin/backup --help

#########################################
       openHAB 2.x.x backup script
#########################################

Usage: backup [--full] [filename]

  e.g. ./backup                     << Makes a file with a timed filename
       ./backup myBackup.zip        << Makes a file called myBackup.zip
       ./backup --full              << Makes a full backup file with a timed filename
       ./backup --full myBackup.zip << Makes a full backup file called myBackup.zip

Use this script to backup your openHAB configuration, you can use the 'restore' script
from any machine to transfer your configuration across to another instance.

A full backup includes the tmp and cache directories that are normally excluded.

Set /var/lib/openhab2/backups to change the default backup directory.
Set  to change the default backup temporary directory.

Um die Daten aus einen gesicherten Backup wieder herzustellen reicht ein

sudo $OPENHAB_RUNTIME/bin/restore $OPENHAB_BACKUPS/openhab2-backup-19_01_14-17_27_42.zip

Ähnliche Artikel:

  1. Raspberry Pi: Nach update läuft Fhem im Browser nicht mehr. Oder wie spiele ich ein Backup von der Konsole ein (restore)!
  2. Wie kann ein Backup einer SD-Karte (von einem Raspberry Pi) in eine Datei auf einem Mac OS X gesichert werden?
  3. Raspberry PI: OpenHab2 mit: „Failed to fetch http://dl.bintray.com/openhab/apt-repo2/dists/stable/main/binary-armhf/Packages 405 Not Allowed“

wallpaper-1019588
A Nobody’s Way Up to an Exploration Hero: Anime erscheint als Doppelfolge
wallpaper-1019588
[Manga] Nana & Kaoru [Max 9]
wallpaper-1019588
Reiseziele April
wallpaper-1019588
Dein Style-Guide: Finde deinen persönlichen Kleidungsstil