Never Lose Your Home Assistant Server AGAIN

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
backups are super important when it comes to home assistant and your smart home in general but it's often something that's overlooked because it's not really that exciting to talk about or it's just something you never really thought you would need but trust me at some point you are definitely going to need one so today I want to show you how to create the Ultimate Backup strategy for home assistant when you are in need of a rescue we're going to be following the three two one backup strategy for this video which should be more than good enough for most people and that's going to give us three copies of our data on two or more mediums with one of them being off-site now you're going to need to be running home assistant 2023.6 as that added support for network storage thank you which is going to be a critical component of our solution here and you're also going to need a Nas on your network too be that something like true Nas or unread or Synology qnap anything like that will be great so what is the solution well firstly we're going to be setting up backups to Auto magically run and be stored on the network on our Nas and then we're going to have those backups Auto magically sync and store it for free in the Cloud 2 which when combined with our live data gives us the three two one strategy first we're going to set up our network storage to handle our on-site backups to our Nas inside of Home assistant navigate over to settings system storage and then hit add network storage give the share a name select the backup type and then enter the IP address or hostname of your Nas and select the protocol for most of you this will likely be SMB if you use your Nas with Windows though NFS is available too if you need it then enter the name of the share followed by any subfolders and note here that you don't need to add any double slashes to the beginning of any of these fields like you might be used to doing on Windows finally enter the username and password if applicable to access the share once connected head back to settings system and then backups and then click the three dots in the top right hand corner to change the default location of the backups to be stored on your Nas this is a crucial step in making sure backups are stored in the right location as we don't want our backups to be stored locally on home assistant otherwise if we lose our home assistant server and the hardware then we're going to lose those backups too now at this point we could automate these backups using the built-in service that home assistant has for backups but this poses a few issues firstly it's not the most intuitive way to create a good schedule for backups secondly it lacks options for deleting backups meaning that they will be kept indefinitely and start taking up lots of space and finally it doesn't allow us to send data off-site to the cloud that's where the Google Drive backup add-on comes in which solves all of these problems for us and it works really well I've even covered it in the past several times the thing that's really cool about it is that it doesn't just allow you to sync to Google Drive as the name suggests but it can also manage local home assistant backups too with the same schedule head over to settings add-ons add-on store and then hit the three dots in the top right hand corner and then repositories paste in the link to the Google Drive backup repo which we'll find down in the video description and then hit add refresh the page scroll down to the bottom and you will see that you have a new Google Drive backup add-on listed which you'll want to go ahead and install I would recommend taking the Watchdog and auto start options here and then start the add-on and open the backup web page before we do anything here you may want to First consider your Google drive options Google Drive comes with 15 gigabytes of storage for free which is a pretty good amount for home assistant unless you have a ginormous install and most of you since you are watching this on YouTube will likely already have a Google account in which case you have Google Drive already but if you are already using Google Drive then you may have already used a significant portion of your free storage in which case you may consider creating a new Google account specifically for storing home assistant backups in so you can use the full 15 gigabytes just for the backups if you do that then just make sure that you are signed into the account and until we authorize the add-on and then switch back to your regular Google account back home assistant hit the authenticate button which will open up a new tab asking for permissions to your Google account which you can go ahead and accept when you land at this page you can then hit the send credentials button and it may authorize automatically but for me I get an error when doing this so hit the back button and then copy the authorized string instead switch back to the home assistant Tab and then paste the string into the box and hit save if everything was successful you should land at the backups dashboard first let's test everything is working so in the bottom right hand corner hit the plus button to take a new manual backup and you can follow the progress from the dashboard as it's running once complete open up the share to your Nas and you should now see that a backup has appeared and likewise if you open up the Google Drive go into the home assistant backups folder you should also see that we have a backup now there too and we can see everything is working correct quickly take a note of the size of this backup and then on the home assistant backup dashboard delete the backup and then verify it says deleted in both locations as expected that's one of the really cool things that the Google Drive add-on does is that it doesn't just manage your Google Drive backups but it also manages the backups local to home assistant 2 which when combined with the new network storage option makes this whole solution now possible next up at the top hit the settings button and this is where we can Define our retention period if you are using a dedicated Google Drive account for these backups then using the size of the backup you just took you can calculate how many backups you can store in Google Drive before hitting the limit now make sure to leave a little bit of breathing room in case the backups get bigger ultimately how many you want to keep is going to be up to you for me personally home assistant changes quite frequently on a daily basis and if things weren't wrong I'd probably notice it quite quickly so I'd prefer to keep one backup every day for five days rather than one backup per week for five weeks same number of backups but the daily one is much more useful in my opinion than the weekly one as that data is likely to be long outdated scroll down to the days between backups option and set your preference here again I prefer a daily or maybe even a every second day option and you can also set the time of day for backups too you also have the option to set a password here though can I just take a minute to stress how important it is to store this password somewhere in a password manager rather than relying on your memory trust me when your house isn't working and you are under the most intense pressure of your life from your so you don't want to be forgetting that password go ahead and hit save on the options when you are happy and then it's pretty much a waiting game until your backup runs at the specified time one final thing we want to set up however is an automation that will notify you if your backups stops working for some reason head over to settings automations and create a new Automation and under the trigger section select state and then as the entity type backup and select the backup style binary sensor then in the toolbox select problem which basically starts this automation anytime there is a problem with our backups under the action section select call service and then type notify and select the device you want to send a notification to filling in the title and message finally hit save to finish and you are done of course it's really important to actually verify that your backups are being created in both locations once set runs for the first time so don't forget to do that and I'll also mention it's really important to test your backups from time to time no point in having a backup if the one time you actually go to use it it's not complete or it's not what you thought it was so occasional testing is a great way to make sure everything is as it's supposed to be one idea to automate this is just to create an event in your home assistant calendar on say a bi-monthly or a quarterly basis then create an automation to remind you to do it and that's it for my home assistant backup strategy you could take this even further by using your Nas to create further backups using snapshots and replications on true Nas for example or if you're using proxmox then you could back up and replicate the VM and then sync that out to some cloud storage same with VMware loads of different options but I think the strategy that we did here is going to be really good for the vast majority of you but do let me know down in the comments if you have any further tips to add to this of little backup tricks that you might have interested to hear if there is anything else you also do so do hit me up down in the comments thank you so much for watching as always drop this video what you like and get subscribed and I will see you in the next video
Info
Channel: Everything Smart Home
Views: 25,790
Rating: undefined out of 5
Keywords: home assistant, smart home, home assistant setup, home assistant automation, home assistant backups, home assistant backup strategy, home automation backups, smart home backups, smart home backup, home automation backup, home assistant google drive, home assistant network storage, home assistant nas, home assistant network backup
Id: MTlkjVrpo-o
Channel Id: undefined
Length: 9min 49sec (589 seconds)
Published: Wed Jun 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.