How I 支援する Up My Home Assistant Server to iCloud, Google 運動, and More
You’re probably sick of 審理,公聴会 about how important backups are, 特に for personal 装置s and precious とじ込み/提出するs. One thing that can be 平易な to overlook is your smart home 体制/機構, which could take hours of work to 回復する if something goes wrong.
While 地元の backups are all good and 井戸/弁護士席, the more backups you have, the better. Here’s how I’ve 始める,決める up Home Assistant to 支援する up to the cloud, for 解放する/自由な.
Why Bother Doing This?
As long as you’ve enabled the feature under Home Assistant’s settings, you should already be ba cking up 地元で. But 地元の backups aren’t much good if the 地元の machine is the point of 失敗. If the 運動 that’s 存在 used to run Home Assistant and 蓄える/店 your backups suddenly fails, you’re going to have to 始める,決める up all of your 統合,差別撤廃s, 装置s, automations, scenes, and smart home intricacies from 冷淡な.
I learned this lesson first-手渡す 権利 around the time I started 実験ing with the 壇・綱領・公約. I run Home Assistant in a VirtualBox 事実上の machine and I decided that I needed more space, so I resized the 事実上の 運動 and somehow 核兵器d my whole 取り付け・設備. Everything was lost 予定 to 存在 蓄える/店d within the same 事実上の machine.
This wasn’t a big 取引,協定, as I hadn’t started fleshing out my smart home yet. But one thing I’ve since done is 確実にする that my backups are 利用できる outside of the 事実上の machine. For a while, I considered a Home Assistant Cloud subscription, which costs $6.50 per month and 追加するs remote 接近, cloud backup, and some other 利益s (while also supporting the 事業/計画(する) financially).
That was before I realized I already had a トン of cloud 貯蔵 that costs me money each month, with plenty of space to spare. My 即座の thought was that I should put some of my 2TB iCloud 予算 に向かって this, so I 始める,決める to work 人物/姿/数字ing out how to make this work. Since I use a Mac, the methods below are tailored to Home Assistant running 経由で virtualization on Apple’s operating system, but the 根底となるs should 適用する 概して to many Home Assistant 体制/機構s.
First, Enable 地元の Backups
All we’re doing here is taking the backups that Home Assistant already creates (in TAR 判型) and copying them どこかよそで. This is important since it means we can easily 回復する the backup using Home Assistant should something untoward happen.
That’s why the first step is to just turn backups on. To do this, 長,率いる to your Home Assistant dashboard (usually homeassistant.地元の:8123) and スピードを出す/記録につける in. Now click Settings > System > Backups. Enable backups, and configure the settings to your liking. I 始める,決める 地雷 up to 支援する up daily and keep three backups at any time.
Under “Configure backup settings,” make sure that you’ve got a copy of your encryption 重要な either by using the “Download” button next to “Download 緊急 道具” or using the “Show” button to 明らかにする/漏らす the 重要な and keeping a 記録,記録的な/記録する of it somewhere 安全な.
If this is the first time you’ve enabled backups, click the “+ Backup now” button in the lower-権利 corner of the 審査する to create at least one backup とじ込み/提出する.
Exposing Your Home Assistant Backups Folder
Now it’s time to expose your Home Assistant’s backup folder. This was necessary for my 体制/機構 since I’m running Home Assistant within a 事実上の machine. It also gives you some 選択s ーに関して/ーの点でs of how you sync your backup とじ込み/提出するs with your cloud 貯蔵 provider of choice.
To do this, we’ll need an 追加する-on that makes your backup folder 利用できる 経由で SMB 網状組織 株ing. 長,率いる to Settings > 追加する-ons and click “追加する-on 蓄える/店” in the 底(に届く)-権利 corner of the 審査する. Search for “samba” until you see the “Samba 株” 追加する-on appear and click on it. You can now use the “任命する/導入する” button to 追加する it to your Home Assistant server.
Click on the “Configuration” tab at the 最高の,を越す of the 審査する. Here, you’ll need to 始める,決める up some basic login 信任状. 始める,決める a username (or leave the default “homeassistant”) and 選ぶ a password that you can remember. You can leave most other values at their default setting here. The “backup” folder should already be 含むd in the 株 settings, and “Enable Compatibility Settings for Apple 装置s” should also be on already.
Now click “Save” at the 底(に届く) of the 審査する, then 長,率いる 支援する to the “Info” tab and click the “Start” button to start the 追加する-on. Wait a few moments for the 追加する-on to start (the button will change to “Stop”).
The next step is to 接近 your Home Assistant 網状組織 株. On a Mac, I was able to do this by 開始 Finder and clicking on “網状組織.” As long as you’re on the same 地元の 網状組織 as your server (or you’re the host 装置), then you should see a new 株 called “homeassistant” in the 名簿(に載せる)/表(にあげる).
On a Mac, you can 二塁打-click on this 入ること/参加(者) and then use the “Connect As” button to 明らかにする/漏らす the login window. Enter the username and password you 始める,決める, then click connect. You’ll see a variety of sharepoints appear, one of which will be your “backup” folder. 二塁打-click on it and it will be 機動力のある as a 容積/容量. On a Mac, you’ll find it under /容積/容量s/backup from here on out.
Inside this folder, you’ll find any 最近の backups (if you 港/避難所’t made a backup yet, the folder will be empty). Now that you have 接近 to your backups, you just need to come up with some means of copying them to your cloud 貯蔵 provider of choice once per day.
Though you can 開始する these sharepoints from any 網状組織d computer, I like to 始める,決める everything up on the same machine that hosts my Home Assistant server. The Mac 小型の that I use to run my Home Assistant server is always on and awake, so there’s no chance that my cloud backup automations will fail because my MacBook プロの/賛成の is sleeping or switched off.
If you 再開する your Mac, you’ll need to 開始する the sharepoint again for this to work. You can try to 始める,決める this to happen automatically, but if your 事実上の machine isn’t running, the 株 won’t be accessible.
Now Sync Your とじ込み/提出するs
There are many ways to 遂行する this next step, so let’s just run through a few of them. I’ll be using iCloud 運動 as a 目的地, but any cloud 解答 that 統合するs nicely with your system (that you can point to as a 目的地) will do.
自動化する a Shortcut in macOS Tahoe
If you’re on macOS Tahoe, this is trivially 平易な. Apple 追加するd Shortcuts 誘発する/引き起こすs to macOS 26, which 許す you to run a workflow at a 確かな time of day. I 実験(する)d this out by building a simple shortcut.
First, I 追加するd the “Get Contents of Folder” 活動/戦闘 to a new workflow and selected the “backup” sharepoint we just exposed. Next, I 追加するd the “Save とじ込み/提出する” 活動/戦闘 beneath this, clicked “Show More,” and 無能にするd “Ask Where to Save.” Then I clicked the “Shortcuts” variable and selected a 場所 on my iCloud 運動. I also enabled とじ込み/提出する overwriting.
Now, click the “Run” play button to 実験(する) out your shortcut. You’ll need to 許す the shortcut 接近 to your 運動. Click “Always 許す” and watch as your とじ込み/提出するs are copied to your chosen 場所.
Now 長,率いる to the “Automation” tab in the Shortcuts app, and create a new automation that runs at a 明確な/細部 time, every day. Link this automation to the Shortcut you just created, and you’re done.
This will copy your backups to the 明示するd 場所 forever, without 削除するing the old ones. You can either (疑いを)晴らす them out manually or use the same Automator folder 活動/戦闘 that 許すs you to clean up your macOS Downloads folder automatically.
Use macOS Automator to Copy とじ込み/提出するs Instead
Perfect for older 見解/翻訳/版s of macOS, Automator lets you create a simple workflow that will copy the backups folder to a 場所 of your choosing. The way I’ve 始める,決める it up copies the folder, so I shouldn’t need to worry about きれいにする up older backups. I went with this 選択 as I'm still running macOS Sequoia on my Mac 小型の, and I didn't want to 危険 VirtualBox 不安定 bringing 負かす/撃墜する my server (特に before making 適する backup 準備/条項s).
Open Automator and create a new 使用/適用. 追加する the “Get 明示するd Finder Items” 活動/戦闘 to your workflow, and 追加する the root “backup” sharepoint to the 活動/戦闘. Follow this up by dragging the “Copy Finder Items” below this 活動/戦闘, then select your 願望(する)d cloud 網状組織 場所. I chose a “Home Assistant” folder I’d created in my root iCloud 運動 folder. Make sure “取って代わる 存在するing とじ込み/提出するs” is checked too.
Now save the 使用/適用 and run it (the default 場所 is iCloud 運動 > Automator). You’ll need to 認める the 使用/適用 接近 to 網状組織 株, after which your backups should be copied to the 場所 you 明示するd.
Now all that’s left to do is run the 使用/適用 every 選び出す/独身 day, ideally すぐに after your Home Assistant backups run. You’ll need to do this using Apple’s Calendar app. I created a new 地元の calendar (on my server, so it won’t show up on other 装置s), then created a new event called “Backup” for 7 am every day. Under “警報,” choose “Custom” followed by “Open とじ込み/提出する” and then use the 減少(する)-負かす/撃墜する box below to 交換(する) “Calendar” for the Automator 使用/適用 you just created.
攻撃する,衝突する “承認する” and you’re done.
Never Too Many Backups
Though these 指示/教授/教育s are 明確な/細部 to Home Assistant running on a 事実上の machine, the 概念 is solid: expose your backup folder using a 網状組織 株, then 接近 the 株 and 始める,決める up some sort of automation to copy the とじ込み/提出するs to your preferred cloud backup provider each day.
If you’re running Home Assistant 直接/まっすぐに on “明らかにする metal” rather than using virtualization, this could be even simpler. Just 始める,決める your backup 場所 to a directory that’s already 株d 経由で a cloud provider. You could also use an app like Syncthing to synchronize your backup folder with another 場所, for even more redundancy.
Should something go wrong, you’ve got an 外部の backup in the cloud waiting for you. Even if you never need it, it’s good to know it’s there.