Samba Backup: Create and store backups on a Samba share

Unfortunateley my issue with this missing file persists on every backup. I have no idea what’s wrong. My config:

host: 192.168.178.83
share: test
target_dir: SambaHA
username: admin
password: "Password"
keep_local: "2"
keep_remote: "10"
trigger_time: "00:00"
trigger_days:
  - Mon
  - Wed
  - Fri
  - Sun
exclude_addons: []
exclude_folders: []
log_level: debug

Surprisingly, even with the error message, the backup seems to exist?!

Well… I hope someone can answer this as it appears the author may not be responding… Has anyone had any success with adding a second backup to a second remote system. I have not been able to convince it to even try the second system.

No issues here either.

I have replied in more detail to the GitHub issue you opened.

Exactly that’s the main pain point here. Not a single response for months.

I fear to say… everyone running in an issue sooner or later been left with a somehow not well-working backup solution should have a look at the new native network mount support and see if HA already can provide the same set of features out of the box like

  • create backup locally
  • copy backup to network share
  • set file name of local/remote backups
  • version control: keep X local and Y remote backups

It’s just damn annoying being left with a malfunctioning piece of software - an important one cause backups can save asses.

Last hope to finally get dev response and hopefully fix the issue in this basically really great addon is getting down to zero meanwhile unfortunately. My summary based on the last 3 months:

:warning: SAMBA BACKUP = UNMAINTAINED :warning:

1 Like

I have just started using this Add-On but I don’t think anything is broken.

I was having the exact problem detailed above, logs give warnings about not being able to rename the file, the file is created anyway (with a random name rather than the name specified in the config) says it failed in HA.
Try setting your backup location in
Settings → System → Backups → Burger/3dot menu → change default backup location
Set it to “Use data disk for backup”
Set your “Keep Internal backups” in the add-on config to 0 (if you want)

That fixed it for me

1 Like

It looks like the issue with your backup is that the SambaAddon cannot rename the copied file.
But the copy itself went fine…
Check access rights on the share?

It is so unfortunate that it is not supported. I have been using this one from around the original release. What I find to be the real bummer? I also run Unraid and when a module author goes missing, more often than not another dev picks it up and maintains or improves the package. It seems that there are less people with knowledge in the HA community (smaller community) and therefore a few have more work to do to advance the product and maintain status quo. I wish I had the skill set to maintain a plugin and help with this kind of stuff, but I really do not have coding skills and at 58 am just not interested in trying to learn more than I know at this point which is basic perl and shell scripting.

This is not a slam against devs in the HA community, unfortunately just a fact of life.

I made a lot of backups to test. Now my local storage is full.
Where are the backups of the Samba addon stored?

ls /backup is empty

Exactly, where you did specified with the installation.

Go to the addon config, you can see the path there.

Local backups are on the same place, as HA would save them.

The backups always failed.
The .tar file could not be found.

The NAS where to save is empty.

Homeassistant’s hard drive is now so full that I can no longer make backups.

Then there is a chance, you have a lot of temporary files somewhere, I don’t know, where they would be…

/tmp is empty

solved:

rm -R /mnt/data/supervisor/mounts/XXX

Worth giving it a try, but:
there are no options next to “Use data disk for backup” and therefore can’t be saved
grafik

No I don’t want - and I absolutely don’t see how that setting could fix something. It’s more likely due to the restart of the addon something magically fixed itself in your case. Lucky you.

Used SAMBA share user has full access rights. The files on the target are correctly renamed. E. g. Samba_Backup_Partial_Backup_2022_12_9_2023_07_18_02_00.

No progress here :frowning_face:
I set addon log level to debug for now, hoping the get any more details.

The main question is WHY THE HELL the Samba backup sensor status switches to FAILED only because one WARNING (bogus file rename log entry) is logged but the whole process is completely fine.

Anyone seeing anything suspicious in here? I don’t think so, but who knows.

host: xxx.xxx.xxx.xxx
share: Backups
target_dir: HomeAssistantServer
username: user
password: pass
keep_local: "3"
keep_remote: "45"
trigger_time: "02:00"
trigger_days:
  - Mon
  - Tue
  - Wed
  - Thu
  - Fri
  - Sat
  - Sun
exclude_addons:
  - 47701997_rhasspy
  - a0d7b954_influxdb
exclude_folders: []
workgroup: LOCAL@WORKGROUP
backup_name: "{type} Backup {version} {date}"
log_level: debug

@NilsK89 check this post where the default storage can be checked. Usually it’s the default backup folder/share.

Thanks a lot Neonteepee,

You found the solution to the problem.

WARNING: f439c76c.tar does not exist
WARNING: Could not copy backup f439c76c to share. Trying again …
WARNING: f439c76c.tar does not exist

The solution is effectively to change:

Settings → System → Backups → Burger/3dot menu → change default backup location and Set it to “Use data disk for backup”

If you don’t want to keep local backup in HA, then set your “Keep Internal backups” in the Samba Backup add-on config to 0.

The thing is, the default backup location for System Backup in my case was set to my Samba shared folder. So it’s normal for the error to occur since backups are done on the local disk and the default System Backup location was set to my Samba shared folder. Backup tried to find the backup file in the Samba shared folder but the file exists locally. Changing System Backup’s default location from my Samba shared folder to “Use data disk for backup” solved the problem.

1 Like

Attribute "last_backup" does not update / backup status FAILED even they are actually SUCCESSFUL · Issue #146 · thomasmauerer/hassio-addons · GitHub is fixed.

Hi. Several bug reports have been raised reporting that the Samba Backup addon is broken when you use the new native HA NAS function.

I looked a bit. Thomas has not posted anything on this forum since March and not contributed anything on Github since April.

Something must have happened to him. Death. Jail. Marriage. Marriage and baby?

Looking at the addon - it seems a bit redundant. It is an Addon because it added samba client to the OS. That is not needed anymore. The rest is implemented as Bash scripts.

I think we are better off making an equivalent without the Addon using just built-in Home Assistant features.

We can easily schedule backups using automations and calling the service.

But we need implement cleaning up and deleting old backups so it does not pile up. Anyone already implented something like this?

You can send the status via telegram with the following code:
message: Samba backup {{ states('sensor.samba_backup')|lower }}.

Is there a way to send the last_backup > date & time?

Found it
message: Samba backup {{ state_attr('sensor.samba_backup', 'last_backup') }}