Skip to content

Commit d47577f

Browse files
mstormiopenhabian
authored and
openhabian
committed
Rework Availability and Backup resilience recommendations
Signed-off-by: Markus Storm <[email protected]>
1 parent 3cdb232 commit d47577f

File tree

1 file changed

+46
-30
lines changed

1 file changed

+46
-30
lines changed

docs/openhabian.md

+46-30
Original file line numberDiff line numberDiff line change
@@ -260,30 +260,29 @@ sudo openhabian-config
260260

261261
![openHABian-config menu](images/openHABian-config.png)
262262

263-
The configuration tool is the heart of openHABian.
264-
It is not only a menu with a set of options, it's also used in a special unattended mode to automate the setup run, either as part of the RPi image or in a manual install run.
263+
The configuration tool is the heart and center of openHABian.
264+
It is not only a menu with a set of options but also used in a special unattended mode to automate the setup run, either as part of the RPi image or in a manual install run.
265265

266266
⌨ - A quick note on menu navigation.
267267
Use the cursor keys to navigate, <kbd>Enter</kbd> to execute, <kbd>Space</kbd> to select and <kbd>Tab</kbd> to jump to the actions on the bottom of the screen.
268268
Press <kbd>Esc</kbd> twice to exit the configuration tool.
269269

270+
### First steps with openHAB
271+
272+
After your first setup of openHABian completed successfully, please access the openHAB dashboard to dig into its possibilites.
273+
Check out the [openHAB primers tutorial](https://www.openhab.org/docs/tutorial/).
274+
Be sure to read up on the [Configuration](https://www.openhab.org/docs/configuration/) section of the documentation pages to learn more.
275+
270276
### Linux Hints
271277

272278
If you're a newbie to Linux, you sooner or later will have to know some Linux if you want to copy some files or are on the search for a solution to a problem.
273-
To prepare, take a few minutes to study these tutorials and get to know the most basic commands and tools to be able to navigate on your Linux system, edit configurations, check the system state or look at log files.
279+
Take some time at this stage to study tutorials and get to know the most basic commands and tools to be able to navigate on your Linux system, edit configurations, check the system state or look at log files.
274280

275281
- "Learn the ways of Linux-fu, for free" interactively with exercises at [linuxjourney.com](https://linuxjourney.com).
276282
- The official Raspberry Pi help articles over at [raspberrypi.org](https://www.raspberrypi.org/help)
277283
- "Now what?", Tutorial on the Command line console at [LinuxCommand.org](http://linuxcommand.org/index.php)
278284

279-
### First steps with openHAB
280-
281-
After your first setup of openHABian is successful and you are able to access the openHAB dashboard, you should dig into the possibilites.
282-
Install [Bindings](https://www.openhab.org/addons/), discover your devices, and [configure your smart home](https://www.openhab.org/docs/configuration/).
283-
You might want to start defining [Items](https://www.openhab.org/docs/configuration/items.html), [Sitemap](https://www.openhab.org/docs/configuration/sitemaps.html) and [HABPanel](https://www.openhab.org/docs/configuration/habpanel.html) dashboard for your home, but these are just some first hints.
284-
Be sure to read up on the [Configuration](https://www.openhab.org/docs/configuration/) section of the documentation pages to learn more.
285-
286-
### Further configuration steps
285+
### more openHABian configuration
287286

288287
openHABian is supposed to provide a ready-to-use openHAB base system.
289288
There are a few things, however, we need you to decide and act on right now at the beginning:
@@ -315,49 +314,66 @@ They can be changed from openHABian menu.
315314

316315
## Availability and Backup
317316

318-
openHAB is designed to reliably run 24 hours a day, seven days a week - and so should be your server.
319-
This is the right time to prepare your system for disasters such as getting hit by the SD card wear-out/corruption problem which is quite common among users of single board computers such as Raspberry Pis. See [this community thread](https://community.openhab.org/t/corrupt-filesystems-every-2-3-month/13057/20) for more information.
317+
openHABian is designed to reliably run 24 hours a day, seven days a week. That's a complex challenge involving hardware, software and operational procedures.
318+
This is the right time to prepare your system for disasters such as getting hit by the SD card wear-out/corruption problem.
320319

321-
openHABian has a number of features built in to enhance resilience:
320+
Preparing for hardware breakage is easiest and most likely to work with common-off-the-shelf hardware that is known it will work as a drop-in replacement the very moment you will be in need of it (i.e. when your smart home server just died).
322321

323-
1. The Zram feature moves write intensive parts of openHABian into RAM to mitigate the risk of SD card corruption.
322+
::: tip get your spare hardware ready
323+
Order **spare** pieces of *all* hardware components your home automation relies on to work. At a minimum, that's the computer itself and another storage medium.
324+
Have it ready for use *on site*, unboxed, mounted and tested to be working.
325+
:::
326+
327+
HEADS UP: that statement applies to EVERY hardware setup, even if you run openHAB in some virtualized on some $$$ rackmounted Dell server in your basement.
328+
For our recommended hardware setup that means getting another Raspberry Pi (same model), 2 more SD cards and a power supply (in case of emergency, a smartphone charger will also do).
329+
330+
That being said, openHABian has a number of built in software features we borrowed from professional data center operations.
331+
332+
1. SD cards are known they can 'wear out' after some time and crash your OS and openHAB setup and data when they do. See [this community forum post](https://community.openhab.org/t/corrupt-filesystems-every-2-3-month/13057/20) for more information.
333+
The Zram feature moves write intensive parts of openHABian into RAM to mitigate the risk of SD card corruption.
324334
WARNING: power failure will result in some data to get lost (albeit the system should continue to run) so we recommend to also get an UPS.
325335
Zram is enabled by default for swap, logs and persistence data.
326336
You can toggle use in \[menu option 38\].
327-
2. Mirror your SD card: see [auto backup](#SD-mirroring) documentation. You can activate mirroring using \[menu option 53\].
328-
3. openHABian provides an option to move the root filesystem to USB-attached devices.
329-
See \[menu option 37\].
337+
2. Mirror your SD card!
338+
Get an USB card writer and another SD card and set up SD mirroring using \[menu option 53\].
339+
This will ensure you have an always ready-to-use clone of your storage medium handy at all times.
340+
In case of emergency, you can simply swap SD cards and get back online within just a few minutes.
341+
See [auto backup](#SD-mirroring) documentation.
342+
343+
::: tip remote replacement
344+
Disasters love to happen when you're not at home.
345+
With an openHABian RPi mirror SD setup, you can even instruct your partner or even kid or neighbour to replace the SD card and/or computer from remote, by phone. No need for Internet access.
346+
:::
347+
348+
3. Use the integrated original openHAB [openhab-cli tool](https://community.openhab.org/t/recommended-way-to-backup-restore-oh2-configurations-and-things/7193/82) at regular intervals to interactively backup/restore your openHAB **config** \[menu option 50/51\].
349+
4. Use [Amanda Network Backup](http://www.amanda.org/) to create full system backups.
350+
HEADS UP: This is NOT meant to be are replacement for #1 or #3, it's a *complement* that will also enable you to restore your system to any point in time of the past.
351+
The specific [Amanda documentation is here](openhabian-amanda.md).
352+
Use \[menu option 52\] to set up.
353+
5. For completeness, openHABian still provides the historic option to move the root filesystem to USB-attached devices. See \[menu option 37\].
354+
We don't recommend or support doing so but if you're convinced this is beneficial to your situation, feel free to go for it.
330355

331356
WARNING 1: openHABian does not support hardware modifications to have an effect on the system itself such as to add an SSD drive to boot from.
332357
We clearly recommend NOT to do this, for your own sake of reliability.
333358

334359
WARNING 2: USB sticks are as susceptible to flash wear-out as SD cards are, making zram the better choice for a standard Pi to run off its internal SD card.
335360

336-
4. Use the integrated original openHAB [openhab-cli tool](https://community.openhab.org/t/recommended-way-to-backup-restore-oh2-configurations-and-things/7193/82) to interactively
337-
backup/restore your openHAB **config** \[menu option 50/51\].
338-
5. Use [Amanda Network Backup](http://www.amanda.org/) for full system backups, documentation [here](openhabian-amanda.md).
339-
See \[menu option 52\].
340-
341361
Standard openHABian install enables zram by default (#1).
342-
You can disable zram (#1) and move the system over using menu options 37 (#3) once you attached a _safe_ external medium to your system (such as an SSD), but we recommend against doing so.
362+
You can disable zram and move the system over using menu options 37 (#5) once you attached a _safe_ external medium to your system (such as an SSD), but we recommend against doing so.
343363
[To restate](#befair): this setup is not supported by us maintainers and you'll be on your very own to find and fix any problems you might run into.
344364
Finally, we strongly suggest you install Amanda (#4) right after you finish your setup.
345365
Amanda is to take care to backup the whole system to be able to quickly restore it when in need.
346366
This is not done by default because it requires a number of user inputs, but you should not skip it for your own safety!
347367

348-
`Delayed rules load` will be enabled by default in openHAB 2 but disabled in openHAB 3 (which has a new start-level system).
349-
This function will rename the rules files so they get ignored by the starting openHAB instance, then after 2 minutes they're renamed back.
350-
You can toggle to use this feature in menu option 44.
351-
352368
## Setup notes
353369
### `openhabian.conf`
354370

355371
You can actually set a number of parameters _before_ you run an unattended installation.
356372
This applies to the RPi image on an SD card as well as to a manual installation.
357373
You can also try with a different set of parameters if your initial attempt fails:
358374

359-
- Flash the system image to your micro SD card as described, do not remove the SD card yet
360-
- Access the first SD card partition (it's a vfat/FAT-32 (Windows) filesystem so just use the file explorer of your client PC)
375+
- Flash the system image to your micro SD card as described, do not remove the SD card yet
376+
- Use Windows file explorer to access the first SD card partition. Re-plug if needed to open in Windows file explorer, it's a vfat/FAT-32 (Windows) filesystem.
361377
- Open the file `openhabian.conf` in a text editor
362378
- Uncomment and complete the lines to contain the parameters you want to set
363379
- Save, unmount/eject, remove and insert into the RPi and boot it

0 commit comments

Comments
 (0)