Samba Backup: Create and store backups on a Samba share

Sorry @thomasmauerer I couldn’t make it work, I don’t understand or I am making something wrong:

I have like this and work perfect !!! (HA installed at Hyper-V VM (192.168.1.240) named homeassistant --LEFT

I want in this location but not working (Location at Main Windows 10 OS(no VM) in a share folder 192.168.1.64 named JM-MAIN – RIGHT

Do what is wrong?? Thank you !!

I recently added Samba Share on my system. I would like to offer help but I can’t read a picture.

I believe that you are showing a screenshot of your smb.conf file? Why don’t you simply copy the shares section from the file and post them in the forum message BETWEEN CODE TAGS?

Sure @stevemann , strange you can not see an upload image, but here is…thank you anyway.

Here is working perfect !!!

host: 192.168.1.240
share: backup
target_dir: HAbackup
username: h******o
password: 'J******1'
keep_local: 10
keep_remote: 20
trigger_time: '00:00'
trigger_days:
  - Mon
  - Tue
  - Wed
  - Thu
  - Fri
  - Sat
  - Sun
exclude_addons: []
exclude_folders: []
backup_name: '{type} Snapshot {date} v{version}'

but I want to backup in this other location :point_down:

host: 192.168.1.240
share: \\JA-MAIN\Users\julio
target_dir: HAbackups
username: h*******o
password: 'J*******1'
keep_local: 10
keep_remote: 20
trigger_time: '00:00'
trigger_days:
  - Mon
  - Tue
  - Wed
  - Thu
  - Fri
  - Sat
  - Sun
exclude_addons: []
exclude_folders: []
backup_name: '{type} Snapshot {date} v{version}'

:wave:

The host ip is not correct!
In you picture the host IP is 192.168.1.64.

The share name is not correct!
The share in you picture is named “JA-MAIN”

The folder should be “Users/julio/HAbackups”.

I can see it, I just can’t read it. Not all of us have 20 year old eyes.

You can click on it and then you can zoom it and read it (yes, my eyes are from the 60s).

Hello @carsten_h I have tryed but get this errors

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[18:17:56] INFO: Host: 192.168.1.64
[18:17:56] INFO: Share: JA-MAIN\Users\julio
[18:17:56] INFO: Target Dir: HAbackups
[18:17:56] INFO: Keep local: 10
[18:17:56] INFO: Keep remote: 20
[18:17:56] INFO: Trigger time: 00:00
[18:17:56] INFO: Trigger days: Mon Tue Wed Thu Fri Sat Sun
[18:17:56] WARNING: tree connect failed: NT_STATUS_BAD_NETWORK_NAME
[18:17:56] FATAL: Cannot access share. It seems that your configured share does not exist.
[18:17:56] FATAL: I found the following shares on your host. Did you mean one of those?
[18:17:56] FATAL: 
	Sharename       Type      Comment
	---------       ----      -------
SMB1 disabled -- no workgroup available
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Yeah !!! I have 5 years starting to understand what you mean, thank you anyway.

@carsten_h has give us the perfect solution !! :+1:

You can click on it and then you can zoom it and read it

No, you did not what I wrote.
You used not the share name I had written!

Sorry, wrong updated picture, yes I did it and still did not working !!!

Thank you @carsten_h …any comment?? :sleepy:

The addon can not connect to the host or the share is not available. I can not tell why this happens.
I have my share on a QNAP NAS where I simply created a share and it worked directly.

Can you see the share from Windows Explorer?

Thanks for all your time and effort @thomasmauerer i will install this tonight!

host: 192.168.1.64
share: JA-MAIN
target_dir: Users/julio/HAbackups

Please mind about using capital or small letters (*nix systems distinguish) and use slash instead of backslash within the configuration file.

Make sure the Share JA-MAIN exists and has the subfolders:

→ Users → julio → HAbackups

below it!

Tried to use the addon as well. After entering the github link in the repositories, as given in the readme of the documented installation of the addon, the entry “Tom’s Home Assistant Add-ons” appears in the list as expected. But that’s all. No entry in the Add-on Store is given!? Are there any requirements for this very helpful addon? Appreciate any response.

Now is working (sharing to help someone else)

Thank you @stevemann @carsten_h @Tamsy for you help !!!

I just create a test file inside the share folder and that make it work ( you know how the IT is) :sweat_smile: and curse the right share and target_dir names !!! :+1:

I cant save this card when icon: line is in it ? config error

Show the config you are trying to save. I’m still using this exact config. Copy and paste the text rather than using a screenshot.

entities:
  - entity: sensor.samba_backup
    icon: 'mdi:file-replace-outline'
    name: Backup Status
  - attribute: backups_local
    entity: sensor.samba_backup
    icon: 'mdi:file-outline'
    name: Local Backups
    type: attribute
  - attribute: backups_remote
    entity: sensor.samba_backup
    icon: 'mdi:file-move-outline'
    name: Remote Backups
    type: attribute
  - attribute: total_backups_succeeded
    entity: sensor.samba_backup
    icon: 'mdi:file-check-outline'
    name: Succeded Backups
    type: attribute
  - attribute: total_backups_failed
    entity: sensor.samba_backup
    icon: 'mdi:file-cancel-outline'
    name: Failed Backups
    type: attribute
  - attribute: last_backup
    entity: sensor.samba_backup
    icon: 'mdi:file-clock-outline'
    name: Last Backup
    type: attribute
show_header_toggle: false
title: Samba Backup
type: entities

some of the errors

Der blev fundet konfigurationsfejl:

  • Påkrævede nøgle “entities.1.tap_action” mangler.
  • Påkrævede nøgle “entities.1.tap_action” mangler.
  • Påkrævede nøgle “entities.1.tap_action” mangler.
  • Påkrævede nøgle “entities.1.tap_action” mangler.
  • Påkrævede nøgle “entities.1.tap_action” mangler.
  • Påkrævede nøgle “entities.1.view” mangler.
  • Påkrævede nøgle “entities.1.view” mangler.
  • Påkrævede nøgle “entities.1.view” mangler.
  • Påkrævede nøgle “entities.1.conditions” mangler.
  • Påkrævede nøgle “entities.1.url” mangler.
  • Påkrævede nøgle “entities.1.entities” mangler.
  • Påkrævede nøgle “entities.1.service” mangler.
  • Påkrævede nøgle “entities.1.text” mangler.
  • Påkrævede nøgle “entities.2.tap_action” mangler.

Where are you trying to save this?