I’m looking to automate backups of my RPi and OH 1.8 and was curious what everyone is using for this purpose. My main goal would be to backup the config files both locally and offsite in an automated way. Right now, I’m manually copying these files to my NAS for local backup and doing the flash drive dance for offsite storage. Too many steps = high likelihood of forgetting = failure!
Eventually, in addition to scheduled backups, I want OH to backup its files to the cloud if there’s any kind of alarm in the home (smoke, water, security), if there is a weather warning for our area (severe weather, tornado, etc) or if power is out and we’re running on backup battery power.
Im am using a backups script from a friend that uses rsync.
But this is properbly a better solution, because it is used by a big community. http://rsnapshot.org/
For offsite-backup:
i connected my network via VPN with the network of my parent in another city.
I placed a RPi with an external HDD there and use rsync the same way I use it locally.
Important:
I have not yet tried to restore anything.
I’ve made my whole openhab deploy folder (I’m not using a package manager package) into a git repo. I ignore logs and similar files, but save everything else. Including addons packages. It’s not automated, but whenever I make changes I do a git commit. That way I can see my configuration at any particular point. I use rhodeCode as my private repo management system and I can push my changes to that. There are many other ways that you could push your changes to an external repo as a backup.
I really appreciate everyone’s responses. I am a little conservative when it comes to hosting data on a third-party site. I’ve experienced far too many instances in my industry where hosts/vendors go out of business. Sure, we always have the opportunity to export our data first, but it’s just made me sour to the process. I really like the sound of putting a Pi and external hard drive at a remote site (friends, family, work) and rsyncing to those site(s).
With regards to the concern about backing up in the event of a fire, weather, or other emergency - I’m thinking of only backing up the rules files (small text files) - those are the brains to my system. Provided power isn’t cut, it should only take seconds to save those off site for the absolute most current version. Maybe I’m just anthropomorphizing my system - trying to make me feel like it’s doing self-preservation.