Home Assistant automated backups - using Synology NAS

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 35

  • @francmassaneda
    @francmassaneda Месяц назад +1

    Thanks a LOT. It worked like a charm. At 07/2024, the ubication shows at the backup page of Home assistant already, so no confusion ;)

    • @LarsKlintTech
      @LarsKlintTech  Месяц назад

      Fantastic! I am very happy you got it working 😊

  • @chrschra
    @chrschra 2 месяца назад +1

    Great video, very good explanation! It would be great to have more information: 1. Partial backups, when to use and how, after an initial full backup, 2. Delete backups if older than X days or more than x files in backup directory, 3. Check which backup has to get created by the flow according to the given file structure in the backup directory.
    Do you think it's possible to solve that and can we expect a video on this? Didn't look yet, cause I liked your video a lot.

    • @LarsKlintTech
      @LarsKlintTech  2 месяца назад

      Thanks for the feedback and suggestions. Partial backups are fine if you do them regularly, and you can run them any time on your system afaik. I prefer full backups because my OCD dictates it 😂
      It wouldn't be difficult to set up a process or script that removes files older than a certain number of days. I might do that.
      I don't understand your point 3.

    • @chrschra
      @chrschra 2 месяца назад +1

      @@LarsKlintTech I just understood that partial backups are not like incremental backups. Forget my comment on that. Because of that my third point becomes obsolete.

  • @basscheutjens6612
    @basscheutjens6612 Год назад +1

    One small tip. The inject node by default already sets the timestamp into msg.payload, so you don't need the additional change node. Regarding backing up. I've been using the add-on "Samba Backup" for a while now to automatically create a backup each night. This add-on takes care of creating the backup and copying it to a samba share. It also copies backup files that are created in other ways, like when installing update and you can select how many backups to keep locally (on HA) and how many to keep on the share. I haven't decided yet if I will move to this new functionality or not, but thanks for showing how it works.

    • @LarsKlintTech
      @LarsKlintTech  Год назад +1

      Ah, very good point Bas. Thanks for that shortcut. I haven't used the Samba backup add-on, so can't really comment. If you have something that works for you with no effort, then stick with it 😊😊

    • @basscheutjens6612
      @basscheutjens6612 Год назад +1

      Yeah, I guess you're right. Btw, I was wondering how your RF / ceiling fan project is going on? After our comments exchange on that other video I decided to completely rewrite mine (and make it way better) and I'm curious how you've done it

    • @LarsKlintTech
      @LarsKlintTech  Год назад +1

      @@basscheutjens6612 I haven't started that project just yet. I have the parts I need though I think, so will probably get it done over the next couple of months.

  • @michaelallen1359
    @michaelallen1359 10 месяцев назад +1

    This seems like a lot of work for something so simple, but thanks for teaching me this as a second course

    • @LarsKlintTech
      @LarsKlintTech  10 месяцев назад

      At least you only have to do it once 😊

  • @SaulLeighton
    @SaulLeighton 10 месяцев назад +1

    Hey Lars. Liked your video.
    F.Y.I. - It was quite easy to install and set-up Home Assistant directly on my Synology NAS as a Docker image.
    Seems to work OK (CPU and RAM are fine), and the config files are stored natively on the NAS storage in SHR2, so quite safe.
    If I wanted extra peace-of-mind, I could also back it up to Google Drive and Microsoft OneDrive using Synology Cloud Sync.
    However, running under a Docker image, the HA menus are slightly different to the ones on your PC (presumably Windows?), shown in the video.

    • @LarsKlintTech
      @LarsKlintTech  10 месяцев назад

      There are many ways to run HA, and Docker is a very common way too. I run it on a RP 4, and then back it up to my NAS as well as Azure.
      I'm not sure why the menu is different. In what way?

    • @francmassaneda
      @francmassaneda Месяц назад

      I run it on VM on the synology. Being able to snapshot the whole MV is great, and integrations work easier with the MV. And the resource usage is so low that doesn't matter that in docker is even lower.

  • @craigw4644
    @craigw4644 Год назад +1

    Worked perfect; is a little weird, file names on the nas. File name also does not match the name in the HA root/backup directory.

    • @LarsKlintTech
      @LarsKlintTech  Год назад

      Definitely weird with the file names. It must be just the mapping or something. Hopefully someone fixes it in a future update 😊

  • @ourvdo549
    @ourvdo549 7 месяцев назад +1

    It is ironic that HA can't automate it's own baackups!

    • @LarsKlintTech
      @LarsKlintTech  7 месяцев назад

      Very 😂, but then someone would complain it isn't done the right way 🤷‍♂

  • @Adzter01
    @Adzter01 Год назад +1

    How did you get the JSON script? I tried copying yours directly but getting errors

    • @LarsKlintTech
      @LarsKlintTech  Год назад

      You can click "load sample data" and that will give you the format and syntax. Then I changed it to use my values.
      What do you have currently, and what are you trying to do?

  • @Tntdruid
    @Tntdruid Год назад +2

    I'm using the Google drive add-on.

    • @LarsKlintTech
      @LarsKlintTech  Год назад

      Yes, that is a great way too. I do like having it locally too when it is with more than one copy (RAID).

  • @CmdrFlemming
    @CmdrFlemming Год назад

    Great video - Tak Lars.
    I just cannot get it to work 😕The SMB share works _fine_ when I access it from Windows 11 using the username & password i configured for the backup folder. . . I suspect that it is some kind of access-control issue. My habackup user is explicitly only allowed to access/read/write in the "media\habackup" folder. IF the user tries to go into or create another folder/file like "media\someOtherFolder" it is denied... It would be great if I knew where to look for errors - the message i get is not helpfull to me since I am only a few weeks down the HA rabbit-hole ;-)
    This is the error:
    "Mounting did not suceed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-.mount for details."

    • @LarsKlintTech
      @LarsKlintTech  Год назад

      Which version of SMB are you using on your NAS? As @VLC8792 mentions in another comment, he had to change the version to SMB2 before it would work.

    • @CmdrFlemming
      @CmdrFlemming Год назад +2

      Thank you for replying @@LarsKlintTech. As usual it turns out to be human error... i misread a couple of settings in my DS918+ and had it cinfigured to ONLY allow SMB2.0 - thats not good enough since 2.1 is minimum. I fixed the settings to allow 3.0 and now all is good

    • @LarsKlintTech
      @LarsKlintTech  Год назад +1

      @@CmdrFlemming No worries mate. Really happy you got it working. I could have run into this issue too, but my SMB default settings were apparently okay.

  • @VLC8792
    @VLC8792 Год назад +1

    Just one thing, Home Assistant & the NAS have to be on the same subnet. My NAS, unfortunately, is on a different subnet than Home Assistant which is a shame as this would make backing up HA easier.

    • @LarsKlintTech
      @LarsKlintTech  Год назад

      Awww, really? I wasn't aware of this. I use devices in HA (Shelly devices for example) that are on different VLANs but is it different for subnets?
      Does this help: www.home-assistant.io/integrations/ssdp/

    • @VLC8792
      @VLC8792 Год назад +1

      D,oh. Old age brain fade here, I’m already monitoring my NAS in HA. So no problem setting up a share.

    • @LarsKlintTech
      @LarsKlintTech  Год назад

      @@VLC8792 Good news then!! 👍

    • @VLC8792
      @VLC8792 Год назад +1

      Ok after a bit of research I found I had to change the SMB setting in DSM 6.2 to SMB2, worked first time after that.

    • @LarsKlintTech
      @LarsKlintTech  Год назад

      @@VLC8792 Yeah right. I am not sure what that means 😂