Backup Plan / Strategy

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.


I would think that when the bad incidient happens, you are already five minutes too late to have had been running the backup :smile:

I am using raspiBackup ( sorry, web site is in german only at the moment , ), for which I have set up two smallish scripts to run it

  • once weekly, doing a full dump of the SD card, to my NAS
  • once daily, doing a delta backup via rsync, to my NAS
  • The conf directory is kept in git (and pushed to my git server on the NAS), so I can get back to any configuration I made via text files
  • And to take care of the my-house-has-burned-down case, my NAS is periodically backed (encrypted, of course) to my internet provider
  • aaaand of course, I test every now and then whether the full dump can be written to a fresh SD card

I guess this keeps me safe except in the case when a big meteor wipes out most of Europe, in which case I’m pretty screwed anyway :slight_smile:

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.

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.

I have not yet tried to restore anything. :worried:

Which in my book counts as “You do not have a backup” :smiling_imp:

2 Likes (supports live backup)

@hakan: There is an English page available also :wink:
And you can toggle between English and German. Just use the German or US Flag on the top left corner :slight_smile:

As an aside: Today the new version 0.6.2 of raspiBackup was published which supports Raspi3 in USB boot mode without any SD card

1 Like

Ah :blush:

Time to update my wiki page about Pi backups then :smile:

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. :smiley:

Thanks again everyone - great discussion!