Skip to content

Instantly share code, notes, and snippets.

@ahue
Created February 5, 2021 20:01
Show Gist options
  • Select an option

  • Save ahue/a87705eecdba9e49a5c4bfe3a3da19e2 to your computer and use it in GitHub Desktop.

Select an option

Save ahue/a87705eecdba9e49a5c4bfe3a3da19e2 to your computer and use it in GitHub Desktop.
Openhab2 Backup Script
#!/bin/bash
# create new folder for the day
DATE=`date +%Y-%m-%d_%H-%M-%S`
BACKUP_PATH=~/openhab2-backup
# backup metadata in ./meta
mkdir -p $BACKUP_PATH
sh /usr/share/openhab2/runtime/bin/backup $BACKUP_PATH/openhab2-backup-$DATE.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment