I really recommend you check in your config and code in versioning system such as git or subversion. You then get history of changes and you can go back if needed. You still need to back up your versioning system, unless you make a private repo at github or similar.
I check in all my config on all servers, rpi etc. It has saved me numerous times.
It’s a little annoying, but that’s why I have my backup cron jobs email me a little confirmation when they run. Then I might notice. “Hey, I didn’t get that PosgreSQL was backed up email this morning, better look into that.” But now I realize I need to probably add some more confirmation like listing the size and contents of the tarball to the email. It might be saving zero length backups and I’d never know it.
Another thing I do is code all my configurations in Ansible so as long as I have the data/configs backed up I can rebuild the machine with a quick run of a task. I had to do this just this last week as my NUT server lost power (ironic I know) and corrupted the file system. Rather than fight it I burned a fresh Raspbian image and ran my Ansible task and was right back up and running. It was the first time I was able to prove out this approach personally and I’m very pleased.
I’ll also add to the chorus of those recommending checking in the configs to git or some other source control system. Even if you do everything through PaperUI, the JSONDB is a text file and perfectly suitable to source control. All my OH configs, Ansible scripts, etc are checked into a private Gogs server.
I have been using Ansible for my general purpose RPI’s including my Kubernetes cluster, but I’ve held back on experimenting with my OH installation. I would really appreciate it if you would share both your config files and your general experience with using Ansible with OH.
It was just a dumb mistake. Just lazy. Sometimes you got to admit it publicly to save others the embarrassment.
For now a cron job is dumping my opehab config on my NAS and it works, yes I checked!!
@rlkoshak I saw you mentioning ansible in a different post a while ago. I have to take a good look at that. For now I will do a fast rebuild since I don’t have time but I will keep that in mind for the future.
FWIW, Amanda backup runs are started from cron (or systemd timers, actually), and you actually get the result mailed to you, too.
Just sayin’ because an OH user to read this thread might not be capable of setting up his own backup system like we IT guys can. That’s why Amanda is there, part of openHABian.
PS: admittedly, I don’t validate every single report either.
I don’t want to hijack this thread so I’ll post a new one. For some of my older examples and musings see A quick intro to Ansible. There has been a lot written on the forum in addition by me and others. I’ve recently gone through a complete rewrite of my roles to make them all much more idempotent. I’m not yet using Ansible vault so I can’t really post the whole shebang to Github but I can share the openHAB related ones here.
I’ll update this reply once I write the new post about Ansible.
But a tl;dr is my general experience using it with OH is the same as using it for NextCloud, my own custom services, Nightscout, etc. It’s awesome! I don’t have to remember anything! It’s all written down and it’s all there checked in to my personal git server where I can see the history of my machine’s configurations. OS upgrades are super easy too: install the new OS and run the Ansible playbook to reconfigure everything. Everything is documented and repeatable.