this post was submitted on 29 Aug 2023
44 points (100.0% liked)

homeassistant

12080 readers
4 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS
 

I use Samba backup and it runs nightly, fortunately.

I tried to update to the latest HA core the other day, and it failed. Reboot and weird things stop working all over the place. The log showed the recorder and a bunch of other things failed to start. When I looked at the command line, I found that files had apparently been corrupted. My configuration.yaml, all 791 lines of it, was gone, in favor of the stock configuration.yaml file.

I restored from the most recent backup before the trouble began, which was taken Saturday morning (I assume the corruption is why it didn't run after that). No dice. Friday's backup got me up and running again, fortunately. I had to re-do a few things I'd changed Friday, but what a relief.

I made the changes again and made a new full backup. I also increased the number of backups to keep from 7 to 10.

Do regular backups, people. Save yourself a lot of headache. I use the Samba option, but there are options to upload to things like cloud storage as well.

top 11 comments
sorted by: hot top controversial new old
[–] walden@sub.wetshaving.social 9 points 1 year ago

This Google Drive add-on has worked really well for me. https://github.com/sabeechen/hassio-google-drive-backup

[–] kylian0087@lemmy.world 2 points 1 year ago (2 children)

A plugin i use for backups as well is Samba Backup. It allows you to make backups and save them on a network share. if for some reason your drive dies (I hat this happen once) Not all your backups are taken with it. I learned this the hard way.

[–] EyesEyesBaby@lemmy.world 2 points 1 year ago (1 children)

Do you still need that plugin since you can backup to samba shares natively now?

[–] limelight79@lemm.ee 1 points 1 year ago

Yeah, I have them on an entirely different computer at the moment, but even just a separate drive would work. (In the past, I ran HA on a virtual machine on my server, and the backup was also on the server, on a different drive. Now, it's running on my desktop machine, with backups still on the server.)

[–] howrar@lemmy.ca 2 points 1 year ago (3 children)

Anyone know if there are good backup options for sftp?

[–] CondorWonder@lemmy.ca 1 points 1 year ago

There is an add on available to help offload backups via SFTP too.

[–] limelight79@lemm.ee 1 points 1 year ago

Good question. I did a quick search and didn't see anything, but that doesn't mean there isn't something out there. There is something that uses FTP, so maybe it can be modified to support SFTP relatively easily.

[–] MostlyGibberish@lemm.ee 0 points 1 year ago

SFTP is pretty simple to work with via shell commands. Your best bet is probably just to write a script to archive/compress your configuration and upload it, and then set that script to run periodically. You can do this within HA.

https://www.home-assistant.io/integrations/shell_command/

[–] DeltaTangoLima@reddrefuge.com 1 points 1 year ago

2N+C for me. I backup nightly to one NAS then use rclone to sync to a second NAS, as well as to encrypted storage on S3. 14 days of backups kept. Plus I backup the Proxmox container nightly, and keep 14d+12m+1y of those.