Samba Backup: Create and store backups on a Samba share

Once again, the addon stopped working after suddenly trying to run at 4am instead of 11pm :



Looks like the watchdog is also not doing its job

edit : looks like it fails every sunday, investigating.

I have an auto reboot running every sunday at 4am

edit2 : is this the solution ?? hassio-addons/samba-backup/DOCS.md at 373b8c5ca49e54e2355e9b8f167fed0b25ac1ffe · thomasmauerer/hassio-addons · GitHub
edit3 : no looks like it’s unrelated to my issue

Another week, another reboot, another error :frowning:


Exact same behavior.
Looks like the Watchdog is not working.

edit :
I created this automation as a workaround :

alias: Samba Backup Fix
description: Starts the samba backup service
trigger:
  - platform: time
    at: "05:00:00"
condition: []
action:
  - action: hassio.addon_start
    metadata: {}
    data:
      addon: 15d21743_samba_backup
mode: single

I don’t like this as a solution, but I’m out of ideas.

Hi,

Thank you for this great add-on. I jut miss 1 thing, being able to snapshot/backup instantly from the add-on (settings) screen. Whenever i need an instant snapshot i now have to change the time of the backup to 2-3 minutes in the future to force the backup and wait for it to happen. It would be nicer to have a button to force a backup straight away. You might wonder why? Well, whenever you wish to install/update critical stuff you would want an instant update/snapshot before and after installing and configuring.

Maybe you could add this?

Thank you.

There is an action to start a backup right away. I have this script for example:

backup_to_nas:
  alias: Backup to NAS
  mode: single
  sequence:
    - action: hassio.addon_stdin
      data:
        addon: 15d21743_samba_backup
        input: trigger

Then add the script entity to the dashboard

1 Like

I just have a button card for that on my dashboard…

type: button
name: Manual Samba Backup
icon: mdi:database
show_name: true
show_icon: true
tap_action:
  action: perform-action
  perform_action: hassio.addon_stdin
show_state: true

I have been running Samba backup with no issues for about 6 months and it suddenly stopped about 3 weeks ago. Running version 5.2.0. The log states that it cannot access the share for some reason. Not sure what changed to cause this.
The share is a folder on my PC.

cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[24-09-15 18:33:16] INFO: ---------------------------------------------------
[24-09-15 18:33:16] INFO: Host/Share: 192.168.19.121/HA Backup
[24-09-15 18:33:16] INFO: Target directory: Backup
[24-09-15 18:33:16] INFO: Keep local/remote: 14/60
[24-09-15 18:33:16] INFO: Trigger time: 05:00
[24-09-15 18:33:16] INFO: Trigger days: Mon
[24-09-15 18:33:16] INFO: ---------------------------------------------------
[24-09-15 18:33:17] DEBUG: Backups local/remote: 15/26
[24-09-15 18:33:17] DEBUG: Total backups succeeded/failed: 26/2
[24-09-15 18:33:17] DEBUG: Last backup: 2024-08-19 05:01
[24-09-15 18:33:22] WARNING: do_connect: Connection to 192.168.19.121 failed (Error NT_STATUS_IO_TIMEOUT)
[24-09-15 18:33:22] FATAL: Cannot access share. Unknown reason.
[24-09-15 18:33:22] DEBUG: Posting sensor data to API at /core/api/states/sensor.samba_backup
[24-09-15 18:33:22] DEBUG: API Status: 200
[24-09-15 18:33:22] DEBUG: API Response: {“entity_id”:“sensor.samba_backup”,“state”:“FAILED”,“attributes”:{“friendly_name”:“Samba Backup”,“backups_local”:“15”,“backups_remote”:“26”,“total_backups_succeeded”:“26”,“total_backups_failed”:“2”,“last_backup”:“2024-08-19 05:01”},“last_changed”:“2024-09-15T22:27:39.611642+00:00”,“last_reported”:“2024-09-15T22:27:39.611642+00:00”,“last_updated”:“2024-09-15T22:27:39.611642+00:00”,“context”:{“id”:“01J7VWRZEVSBTPS1NCQQ50GKMP”,“parent_id”:null,“user_id”:“a023d812f7b54e369742ad35bde838b7”}}

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Maybe a Windows update caused this?

Check whether the share is really still avaiable to Samba Backup. I would fully remove that share from the PC and recreate it.

1 Like

Yes, I am thinking a windows update caused it. Running WIN10.

Doing a little more digging, I found that SMBv1 was disabled in Windows. I had to go into the control panel to re-enable it and Samba Backup is working again now.

Will MS keep disabling SMBv1 with their updates?

No idea whether this will happen again with MS-updates. However, it’s a simple one-liner to re-enable SMBv1 when using Power Shell.

To check whether SMBv1 is enabled/disabled run from PowerShell:
Get-SmbServerConfiguration | Format-List EnableSMB1Protocol

To re-enable SMBv1 run as Administrator from PowerShell:
Set-SmbServerConfiguration -EnableSMB1Protocol $true

and you should be good again.

1 Like

Dear all,

I experience an issue together with an attached Network-Storage.

The samba-backup is working fine, but after creation, the file is no longer found by the addon, but it is stored on the external device.

How can I get the samba backup addon to “see” the stored files and delete them after the storage time is over?

2 Likes

I experienced a similar issue, but backups are not created locally and not saved to NAS for me, manually triggering with above script it works for both.

So it seems the trigger days are no longer working. Once removed the existing trigger days I cannot add them back.

Later found out that the original/default trigger short day names are no longer accepted: Mon, Tue, Wed, Thu, Fri, Sat, Sun

However it works with full day names: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday

Env details:
Add-on version: 5.2.0
You are running the latest version of this add-on.
System: Home Assistant OS 13.1 (amd64 / generic-x86-64)
Home Assistant Core: 2024.9.2
Home Assistant Supervisor: 2024.09.1

Hi,

try checking the default backup location under http://homeassistant.local:8123/hassio/backups
→ Menu in the upper right and “change default backup location”.

Backup will break, if this is set to the SMB location.

It worked for me, after changing it back to local storage.

I run HA on unraid(xeon gold 5118 12 cores and 64G mem) and my virtual disk is over 1TB and I wanted to shrink it. easiest way I thought was to install new HA instance and restore last nights backup file.

The backup file is 200G

I tried the HA onboarding process and pointed it at the backup file but after 20 hours of “restore in progress” nothing happended.

So I created a new HA user, added samba backup addon and tried the restore process. The 200G backup file was discovered locally in the backup/config folder so I started the restore process. The HA gui connection dropped but 3 hours later … no gui acess. I can ping the server nd HA cli interface is up.

How long should the restore process take and is there anyway to see if the restore process is still active?

I have this addon running perfectly fine on one HA instance and yet, when trying to get it running on another one, I can’t even save the samba backup configuration file even though I copy/paste a perfectly working config file from my other instance.

I hit save then I get the error:

Failed to save add-on configuration, Unknown error, see supervisor logs

there is nothign related in the supervisor logs, perhaps only this one line:

2024-10-02 17:25:41.729 WARNING (MainThread) [supervisor.utils.pwned] Can't fetch HIBP data: Timeout

The HA core logs however show this timeout:

Log Details (ERROR)
Logger: homeassistant.components.hassio.handler
Source: components/hassio/handler.py:615
integration: Home Assistant Supervisor (documentation, issues)
First occurred: 16:20:56 (3 occurrences)
Last logged: 16:34:13

Timeout on /addons/15d21743_samba_backup/options/validate request

Any ideas? The only issue similar to mine is this, where someone said he gets the same error when HA is offline, which is not the case with mine, as I am remotely conencted to it.

And then someoen saying he cannot save a configuration due to HIBP check: Addon UI Configuration not possible due to HIBP check · Issue #4441 · home-assistant/supervisor · GitHub

Please help.

Sorted with a complete reboot of the OS, not just restart of HA. Seems HA had a hiccup somewhere thinking it was offline. Meanwhile, I was remotely connected to it from a different country and was struggling with this nonsense.

Update…
the last 14 daily backups using samba backup where not able to restore. I tried using the HA onboard process and also creating an HA instance and restoring from systems/backup. Nothing worked.

To resolve I fortunatly had the orginal HA vm so I removed samba backup and used HA to create a backup and this restored OK.

Samba backup is now coming nowhere near my system. I run a fairly vanilla version of HA so cannot understand why it didnt restor. I would caution using this without testing your restore files actually work

Hi!
I’m getting the following error in Samba Backup Protocol:
Failed to get 15d21743_samba_backup logs, e.callApiRaw is not a function
No protocol is displayed.

Home Assinstant:

  • Core: 2024.10.4
  • Supervisor: 2024.11.2
  • Operating System: 13.2
  • Frontend: 20241002.4

I am running HA on a synology NAS.
Thanks and kind regards

Me too. Same error when I try to access add-on logs. Started after upgrading to Supervisor 2024.11.2 (no, really, it did…)

Edit: Also, the upgrade doesn’t seem to have created a backup as it should have done, so I’m a bit stuck…

HA 2024.11 is needed to get logs again

1 Like

On my Proxmox Install it seems that this Addin is also responsible for a slow but permanent increase in Memory Usage. Usually I start at around 4GB of Ram. Then after the Backup ran it increased to 9 GB. Then the next night ended up with 16 GB.
This is reproducable in my environment. 2024.11.0 Core with 2024.11.2 Supervisor on Proxmox 8.2.0; HA as virtual machine NOT LXC.

A real pitty, I liked this Addon. Since I disabled it all is fine