Moving Home Assistant DBs to external Flash Drives

So timing is everything… and my timing was perfect (ok, it was slow). Chatting in the Discord forums with some way smarter *nix users than me (Tinkerer and Brian Cribbs), we were brainstorming some ideas on how to extend the life span of the Home Assistant raspberry Pis, we were running. Specifically the SD Cards. Since taking backups of the SD cards are kind of a pain in the ass, I had basically disabled recording and history on my Home Assistant configuration. The solution we came up with was to move the really chatty log files and databases off the SD Card and onto a much more disposable thumb drive. In my case, I have tons of them laying around but any good 16+ GB drive will do. Perfect timing? Of course! Both Brian and Tinkerer wrote up excellent tutorials that I just had to follow along with : Here & Here.

My Pi has 4 USB ports in the back of it, so I grabbed a 32 GB thumb drive and plugged it right in. For the most part, I followed Tinkerer’s instructions. Since I have been running an original install of Home Assistant, I did need to make a few changes (like substituting homeassistant with hass). But in the end, the how to articles DELIVERED! The high intensity DB and log files are now happily writing and rewriting to my disposable thumb drive.

Since I run the USPS component as well, I decided to move the cache index for that using sym links.