Samba Backup: Create and store backups on a Samba share

hello, what is share in the config file? if I type in explorer \\ip-address, then I get some folders. I want to save my snapshot at \\ip-address\folder1\folder2. in this case share=folder1 and target_directory=\folder2?

second question: after starting the add-on, how can quickly test the connection? or do I have to wait until the trigger time to find out?

Yes ! Without \ before folder2

Read the doc : hassio-addons/samba-backup/DOCS.md at 0e49e81fc2a2e797a02cc5c7413b0cafccbc6c32 ¡ thomasmauerer/hassio-addons ¡ GitHub

1 Like

Great addon that I’ve just discovered! Thank you so much @thomasmauerer :slight_smile:

@thomasmauerer, first and foremost, thanks for your work!

I’m trying to setup your Add-On, but whatever I input into the configuration I get the message:

Failed to save addon configuration, not a valid value for dictionary value @ data[‘options’]. Got {‘host’: None, ‘share’: None, ‘target_dir’: ‘’, ‘username’: ‘’, ‘password’: ‘’, ‘keep_local’: ‘all’, ‘keep_remote’: ‘all’, ‘trigger_time’: ‘00:00’, ‘trigger_days’: [‘Mon’, ‘Tue’, ‘Wed’, ‘Thu’, ‘Fri’, ‘Sat’, ‘Sun’], ‘exclude_addons’: , ‘exclude_folders’: }

This was with the default config; it won’t save no matter what I do.

What am I doing wrong?

@thomasmauerer, quick update: I was able to overcome the error message I had, but it might have been more than one thing:

  • Changing from cloud access (Nabucasa remote UI) to local network;
  • Switching from Windows (PC) to Android (smartphone);
  • Small diferences in the actual config file format from one try to the next;

Everything seems to be up and running now.

That was your issue. You had not supplied a path to a SAMBA share.

@thomasmauerer when i want to save in 4:00 AM, it’s save at 5:00 AM
Any idea ?

Unfortunately, not really. Probably some kind of UTC vs local time issue. The timezone itself is given via the TZ environment variable.

Yes, exactly that ! I’m on UTC +1

Is it possible to use this addon together with google backup addon, and without making double snapshots?

I would like one snapshot per day uploaded both to samba and google

I was able to set this up and do a one time manual trigger and it all worked. But the backup in my NAS has a different name from the backup in HA.

My Config:

host: 192.168.xx.xx
share: Backups
target_dir: homeassistant
username: *****
password: *******
keep_local: 2
keep_remote: 5
trigger_time: ‘02:00’
trigger_days:

  • Sun
    exclude_addons: []
    exclude_folders: []
    backup_name: ‘{type} Snapshot {version} {date}’

Screenshots:

HA:

image

NAS:

Try downloading that file from home assistant to see what the name is.

Home assistant does not display the file name. It displays the backup name, which can be different.

Yes I thought so. I did do the download from HA and the file name is same as what is see in HA “Full_Snapshot_0_118_5_2020_12_11_09_53.tar”. since I did a manual trigger I am thinking it might have to do something with it. I will check on Sunday and see how that goes. Not a big deal breaker for me but it would be nice to have a date information in there so I know which one to use in case of emergency.

The filename comes from the snapshot ID and as stated in the Docs that’s not the same as the backup_name option.

Option: backup_name
Note : This only affects the snapshot names, not the file names itself.

But yes, probably it would be better to rename the files to match the configured name.

If anybody is still using the mqtt-based status notifications, make sure to switch to the included sensor. I’m going to finally remove mqtt support in the next release in order to keep the code clean and simple.

my first backup went fine successfully and do not see any issues. Thank you for creating this add-on @thomasmauerer

@thomasmauerer Great add on to my system and setup. Many thanks for this. Works like a charm ! Dumping stuff every night (full !!) on my Synology NAS, space enough there, so safety first. Created a pushbutton on one of my screens to trigger the snapshot manually , after (or before …) I start to do some massive changes.

Keep up the good work, grtz
John

Thank you Thomas. Great add on.
I have limited disk space and this allowed me to free up space and make sure snapshots are stored locally (also on Synology Nas) not on an unreliable cloud.
Makes massive changes for me too.
Great work!

Cheers.
Marco

Agreed. This had me confused, too. I had been using the Google Drive backup add-on, and I like this MUCH better. I’m a big fan of local, as opposed to cloud.

Here’s an unrelated question: Is there any way to send the original snapshots to a different folder?

First, if we’re using this add-on then we’re probably also using the Samba Share add-on, and accessing the HA “config” share from a Windows machine. Wouldn’t it be handy to have the backup folder in that share? With the default location we have to SSH in and use command-line to view the backup folder.

Second, It would be even better if we could send the snapshot directly to the NAS, instead of local to HA then copied to the NAS. Some of us are running HA on a RPi with an SD card. SD cards can fail, and they fail faster the more I/O you do. That’s why the backups.

I’m not complaining, this is a great add-on. Just wondering.

I may misunderstand, but I’m sending a backup to another disk outside of HA and it works fine.