tom_l
September 16, 2020, 10:54am
101
David, my config is set up to create a partial snapshot, excluding my databases and other large addons, every morning at 2:16am
host: 10.1.1.10
share: Backup
target_dir: Hassio
username: hassio
password: [redacted]
keep_local: 10
keep_remote: 30
trigger_time: '02:16'
trigger_days:
- Mon
- Tue
- Wed
- Thu
- Fri
- Sat
- Sun
exclude_addons:
- 15ef4d2f_esphome
- 15ef4d2f_esphome-dev
- a0d7b954_influxdb
- core_mariadb
- a0d7b954_vscode
exclude_folders:
- addons/local
backup_name: '{type} Snapshot (Samba Backup) {date} v{version}'
backup_password: ''
I have an automation that triggers a partial snapshot including my databases weekly at 5:26am on Tuesdays:
- alias: 'Full Samba Backup'
trigger:
platform: time
at: '05:26:00'
condition:
condition: time
weekday:
- tue
action:
- service: hassio.addon_stdin
data:
addon: 15d21743_samba_backup
input:
command: trigger
backup_name: 'Database Snapshot (Samba Backup) {date} v{version}'
exclude_addons: [ 15ef4d2f_esphome, 15ef4d2f_esphome-dev, a0d7b954_vscode ]
This is quite an intensive operation.
I also have another automation that alerts me when Samba backup is running and has succeed or failed:
- alias: Backup Notifications
trigger:
platform: state
entity_id: sensor.samba_backup
condition:
- condition: not
conditions:
- condition: state
entity_id: sensor.samba_backup
state: IDLE
action:
- service: notify.telegram_system
data_template:
title: '*Information*'
message: "Samba backup {{ states('sensor.samba_backup')|lower }}."
- service: logbook.log
data_template:
name: Samba Backup
message: "{{ states('sensor.samba_backup')|lower }}"
That works for both the addon and automation triggered snapshots.
erik7
(Erik)
September 16, 2020, 11:06am
102
Again, thanks a lot Tom!
The â Restore Samba Backup sensor on startupâ works perfectly now.
1 Like
tom_l
September 16, 2020, 11:08am
103
Hmmm, very strange. They should be equivalent.
I donât get it either. Both versions should work.
Sorry if I was not clear enough: You only need to delete/rename a sensor if you manually created one before. If you never added a âSamba Backupâ sensor entry in your configuration.yaml, you do not have to do anything.
erik7
(Erik)
September 16, 2020, 1:09pm
105
I never created manually a âSamba Backupâ sensor entry.
It was created when I upgraded to version 4.0, but gone after restart(s).
After I added Tomâs code it was OK again.
tom_l
September 16, 2020, 2:56pm
106
Delete the mqtt sensor (you must have made) from your config and restart. Then upgrade the addon.
_pm
(Peter)
September 16, 2020, 3:13pm
107
Very nice backup tooling!! Thanks a lot
Jefe
(Jeff)
September 16, 2020, 4:18pm
108
Backup integration works great. loving it!
Working nicely in node red! Sends iOS notification if backup failed.
1 Like
Today my system crashed and I need to restore my system to a newly installed rpi4
I have Samba Backup from last night, whatâs the right procedure to restore this backup to a new fresh installation?
Thanks,
Rien
123
(Taras)
September 17, 2020, 7:18pm
112
Thatâs worthy of its own topic in Community Guides.
1 Like
tom_l
September 17, 2020, 7:29pm
113
Good idea. I write one up with screenshots tomorrow.
Hi Tom,
I used another power supply to troubleshoot my issues. The one I normally use in production does not have the power issues.
I did step 1-8. But when I click on restore selected and click on OK if Iâm sure, nothing seems to happen.
Even if I create a new snapshot and try to restore that one, same result.
Hi Tom,
I love this idea but it seems I am a tad dim⌠I managed to get your addon but I am stuck in the config.
My setup:
Network storage :: Synology NAS ( 192.168.1.235 )(with a shared drive /ha_backup which I can access with windows using user and pass)
HA :: Rpi4 with Home Assistant ( 192.168.1.170 ) booting from SSD (Had to use the Beta 5.2 as the vanilla version does not support SSD booting)
Config:
Copy to clipboard
host: 192.168.1.235
share: backup
target_dir: /ha-backup
username: *********
password: *********
keep_local: '5'
keep_remote: '30'
trigger_time: '04:00'
trigger_days:
- Wed
- Sun
exclude_addons: []
exclude_folders: []
backup_name: '{type} Snapshot (Samba Backup) {date}'
So in doing this I get the error: âCannot access share. Please check your config.â
Do you mind explaining where I am going wrong??
my network drive wonât work as it is not Samba? I have no idea what Synology uses but I would bet it uses SambaâŚ
I have to mount it first?
I have no idea what to put under your share option, the samba share name? Where do I get this?
Did I get it wrong and the host is the local / HA ip and not the samba host?
Target directory? I can get to this from windows \192.168.1.235\ha_backup - should I enter the full path?
something totally different?
Thank you ever so much!
Frank
tom_l
September 18, 2020, 5:08pm
116
This is not my addon. I just use it. Have you tried:
share: ha-backup
Note: no leading /
If you get a âCannot access shareâ, the only options that could be wrong are host, share or the credentials, but most likely itâs the share
option.
I guess your config should look like this:
host: 192.168.1.235
share: ha_backup
target_dir: ""
niro1987
(Niels)
September 19, 2020, 5:48am
118
It will look like nothing is happening. After a minute or so when you hit F5, the webpage should go unavailable (thatâs how you know itâs doing stuff). Depending on the size, it should be back online after 20 minutes or so.
Youâre right. I was too impatient or waiting for some sort of confirmation or status update.
Now back on track
DiegoF
(Diego)
September 25, 2020, 7:47pm
120
Hello.
Iâm trying to configure the add on but i canât.
I have this setup on the nas:
IP 192.168.1.249
Folder backup: Backup
This is what i see on windows:
this is my configuration:
host: 192.168.1.249
share: Backup
target_dir: ''
username: user
password: password
keep_local: all
keep_remote: all
trigger_time: '19:00'
trigger_days:
- Mon
- Tue
- Wed
- Thu
- Fri
- Sat
- Sun
exclude_addons: []
exclude_folders: []
this is my log
[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.
[21:15:38] INFO: Host: 192.168.1.249
[21:15:38] INFO: Share: Backup
[21:15:38] INFO: Target Dir:
[21:15:38] INFO: Keep local: all
[21:15:38] INFO: Keep remote: all
[21:15:38] INFO: Trigger time: 19:00
[21:15:38] INFO: Trigger days: Mon Tue Wed Thu Fri Sat Sun
[21:15:39] INFO: Found local mqtt broker - topic is âsamba_backup/#â
[21:15:40] WARNING: protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED
[21:15:40] FATAL: Cannot access share. Please check your config.
/run.sh: line 48: update-status: command not found
[cmd] /run.sh exited 127
[cont-finish.d] executing container finish scriptsâŚ
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
Thanks