core
core copied to clipboard
Create Partial Backup service call not working properly with slug names that have hyphen
The problem
Create Partial Backup service fails with addons slug names that has a hyphen on it's name. You can call the service with most addons slug names and it works. I have the crowdsec-firewall-bouncer and the uptime-kuma addons slug names are: 424ccef4_crowdsec-firewall-bouncer and a0d7b954_uptime-kuma, and as soon as I try to use those slug names I get an error that says for example to change it to this “424ccef4_crowdsec_firewall_bouncer” and try again… If I do that, I don’t get the error but I also get an empty backup…
What version of Home Assistant Core has the issue?
core-2024.1.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Automation
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
service: hassio.backup_partial
data:
homeassistant_exclude_database: false
compressed: true
homeassistant: true
location: HABackups
folders:
- homeassistant
- share
- ssl
addons:
- core_samba
- core_configurator
- core_ssh
- a0d7b954_chrony
- a0d7b954_wireguard
- core_duckdns
- a0d7b954_logviewer
- a0d7b954_portainer
- a0d7b954_adguard
- a0d7b954_ssh
- 89275b70_dss_voip
- core_mosquitto
- 424ccef4_crowdsec
- 424ccef4_crowdsec-firewall-bouncer
- a0d7b954_uptime-kuma
- ccab4aaf_frigate
Anything in the logs that might be useful for us?
this is what I get in Traces -> Trace Timeline of the automation when I run it.
invalid slug 424ccef4_crowdsec-firewall-bouncer (try 424ccef4_crowdsec_firewall_bouncer) @ data['addons'][13]
Additional information
I opened a Topic in forums that explains what I did and it ended up in a recommendation to open an issue, here is the link to it https://community.home-assistant.io/t/problems-with-proper-addon-names-while-using-the-create-partial-backup-service/668933 First I thought it was a wrong slug name issue, but it seems there is something else to the slug names that is not working, because I can use the same slug name that is failing in the Partial Backup to run a addon restart service call and it works.
I can create a partial backup from settings->system->backups, selecting the addons from the list including those two, but if I try to use the service call with the slug names it fails. there is nothing in the logs that can be used.
This is the service call code in YAML that works (removing the 2 addons with hyphen in names):
service: hassio.backup_partial data: homeassistant_exclude_database: false compressed: true homeassistant: true location: HABackups folders:
- homeassistant
- share
- ssl name: Partial HA-Main {year}-{month}-{day} {hr24}:{min}:{sec} addons:
- core_samba
- core_configurator
- core_ssh
- a0d7b954_chrony
- a0d7b954_wireguard
- core_duckdns
- a0d7b954_logviewer
- a0d7b954_portainer
- a0d7b954_adguard
- a0d7b954_ssh
- 89275b70_dss_voip
- core_mosquitto
- 424ccef4_crowdsec
- ccab4aaf_frigate
and this one fails
service: hassio.backup_partial data: homeassistant_exclude_database: false compressed: true homeassistant: true location: HABackups folders:
- homeassistant
- share
- ssl name: Partial HA-Main {year}-{month}-{day} {hr24}:{min}:{sec} addons:
- core_samba
- core_configurator
- core_ssh
- a0d7b954_chrony
- a0d7b954_wireguard
- core_duckdns
- a0d7b954_logviewer
- a0d7b954_portainer
- a0d7b954_adguard
- a0d7b954_ssh
- 89275b70_dss_voip
- core_mosquitto
- 424ccef4_crowdsec
- 424ccef4_crowdsec-firewall-bouncer
- a0d7b954_uptime-kuma
- ccab4aaf_frigate
Hey there @home-assistant/supervisor, mind taking a look at this issue as it has been labeled with an integration (hassio) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of hassio can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign hassioRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
hassio documentation hassio source (message by IssueLinks)
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (backup) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of backup can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign backupRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
backup documentation backup source (message by IssueLinks)
Hi From the last HA supervisor and last HA version, backup file name are juste the slug name with n DIGITs.tar. The backup name is not present in the tar filename. heres a log with partial backup. There's an error when copy and rename at the end of the backup. The slug filename seams good Don't understand. Same on local or NFS share... Same for partial and complete backup Since broken since septembre 2023 (my last backup with good's filename.
[24-01-14 20:16:40] INFO: Samba Backup started successfully
[24-01-14 20:16:40] DEBUG: Starting main loop ...
[24-01-14 20:16:40] DEBUG: Starting stdin listener ...
[24-01-14 20:17:40] INFO: Backup running ...
[24-01-14 20:17:40] DEBUG: Backups local/remote: 13/15
[24-01-14 20:17:40] DEBUG: Total backups succeeded/failed: 298/132
[24-01-14 20:17:40] DEBUG: Last backup: 2023-11-05 10:10
[24-01-14 20:17:40] DEBUG: Posting sensor data to API at /core/api/states/sensor.samba_backup
[24-01-14 20:17:40] DEBUG: API Status: 200
[24-01-14 20:17:40] DEBUG: API Response: {"entity_id":"sensor.samba_backup","state":"RUNNING","attributes":{"friendly_name":"Samba Backup","backups_local":"13","backups_remote":"15","total_backups_succeeded":"298","total_backups_failed":"132","last_backup":"2023-11-05 10:10"},"last_changed":"2024-01-14T19:17:40.576741+00:00","last_updated":"2024-01-14T19:17:40.576741+00:00","context":{"id":"01HM4PH0K0QW564120JZFMDTQK","parent_id":null,"user_id":"201d8b16c45644c08d667d9c14ac4ed4"}}
[24-01-14 20:17:40] INFO: Creating backup "Samba Backup 2024-01-14 20:17"
[24-01-14 20:19:47] INFO: Copying backup fa33ebe1 (Samba_Backup_2024_01_14_20_17.tar) to share
[24-01-14 20:19:47] WARNING: fa33ebe1.tar does not exist
[24-01-14 20:19:47] WARNING: Could not copy backup fa33ebe1 to share. Trying again ...
fa33ebe1.tar is the end backup filename instead of "Samba Backup"
Another exemple Save of the partial module NODERED, the good file name is "addon_a0d7b954_nodered_17.0.1.tar" Now when i try to launch the same manual backup, the filename is XXXXXX.tar where XXXXXX is a slug name ;-( Try to restart HA and OS... it is the same
and this one fails
service: hassio.backup_partial data: homeassistant_exclude_database: false compressed: true homeassistant: true location: HABackups folders:
* homeassistant * share * ssl name: Partial HA-Main {year}-{month}-{day} {hr24}:{min}:{sec} addons: * core_samba * core_configurator * core_ssh * a0d7b954_chrony * a0d7b954_wireguard * core_duckdns * a0d7b954_logviewer * a0d7b954_portainer * a0d7b954_adguard * a0d7b954_ssh * 89275b70_dss_voip * core_mosquitto * 424ccef4_crowdsec * 424ccef4_crowdsec-firewall-bouncer * a0d7b954_uptime-kuma * ccab4aaf_frigate
Same issue with addon slugname "ca5234a0_paperless-ngx" that also contains hyphen in.
Core 2024.3.0 Supervisor 2024.03.0 Operating System 12.1 Frontend 20240306.0
regards Thomas
Same issue with addon slugname "ca5234a0_paperless-ngx"
The next release will be on a new slug name but it's a breaking change and users will need to update the addon manually.
The add-on development documentation only state that the name must be URL friendly.
So it does seem to be an home assistant issue.
Hey there @home-assistant/supervisor, mind taking a look at this issue as it has been labeled with an integration (hassio) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of hassio can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign hassioRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
hassio documentation hassio source (message by IssueLinks)
to update the addon manually
I update HA to 2024.4.4. The issue on samba backup is always here. Can you explain what add on we have to update ? Samba backup add on to beta ?
@Loic691 what you report is unrelated to the original issue. Furthermore, the backup name is generated by the Supervisor, hence it does not belong into this repository.
The problem has also been pointed out by existing issues, specifically https://github.com/home-assistant/supervisor/issues/4947. Please subscribe to this issue for updates.
No there is not the same issue. There is an issue to get in the native backup (not auto backup) the file name not with slug name but with the backnume as filename. There is an issue which Samba Backup (auto backup) Add on doesn't working because a issue on slugname and the file is never copy on the final directory.
Ok, but this is also not the same issue as this issue, as this issue is specifically about using the backup service call and not working for add-ons with hyphens in slug names.
Please open a new issue with all information about your setup, and description of the problem you are seeing.
Ok, but this is also not the same issue as this issue, as this issue is specifically about using the backup service call and not working for add-ons with hyphens in slug names.
Please open a new issue with all information about your setup, and description of the problem you are seeing.
Thanks There is already several issue on samba backup github...