Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synology DSM. Impossible to configure automatic backup. #136924

Open
jlpouffier opened this issue Jan 30, 2025 · 22 comments
Open

Synology DSM. Impossible to configure automatic backup. #136924

jlpouffier opened this issue Jan 30, 2025 · 22 comments

Comments

@jlpouffier
Copy link

The problem

Issue 1
The documentation is pretty thin on backups as of today.
It's basically a single line here

Image

After a few tries on DSM side, I managed to make the option pop in the config entry option flow (It's never documented anywhere you need to configure something on the option flow btw)

Image

Issue 2
backup_path field is mandatory (Why is it not translated by the way? this_is_a_very_technical_way_of_displaying_a_field_name) but I have no idea what to input to create backups at the root of the share.
I tried /, and ..

Nothing works, the results is always the same:

Image

Logs show almost nothing

2025-01-30 15:49:01.846 ERROR (MainThread) [homeassistant.components.backup] Upload failed for synology_dsm.20A0RLRNYFRHE: Failed to upload backup

What version of Home Assistant Core has the issue?

2025.2.0b1

What was the last working version of Home Assistant Core?

Not applicable. New feature

What type of installation are you running?

Home Assistant OS

Integration causing the issue

synology_dsm

Link to integration documentation on our website

https://www.home-assistant.io/integrations/synology_dsm/

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

2025-01-30 15:49:01.846 ERROR (MainThread) [homeassistant.components.backup] Upload failed for synology_dsm.20A0RLRNYFRHE: Failed to upload backup

Additional information

No response

@home-assistant
Copy link

Hey there @hacf-fr, @Quentame, @mib1185, mind taking a look at this issue as it has been labeled with an integration (synology_dsm) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of synology_dsm can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign synology_dsm Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


synology_dsm documentation
synology_dsm source
(message by IssueLinks)

@mib1185
Copy link
Contributor

mib1185 commented Jan 30, 2025

Hi @jlpouffier

  1. you're right, the docs needs to be improved
    the options flow is only needed, when you've already an config entry - usually the backup settings will be configured during config-flow.
  2. indeed the translations are missing for the options-flow (they are already there for the config-flow)
  3. please enable debug logging for both the integration as well as the lib

@joostlek
Copy link
Member

Can we add better checks in the options flow to make sure the path we want to write to exists and that we can be confident that the config is correct?

@mib1185
Copy link
Contributor

mib1185 commented Jan 30, 2025

at the moment, the path will be created if not exist - checking the existence of the path would need further efforts in the lib to implement such a function, but would be possible.

@mib1185
Copy link
Contributor

mib1185 commented Jan 30, 2025

btw. the backup path is a relativ path on the selected shared folder, so no prefixing with . or / is neccessary

@joostlek
Copy link
Member

I think having data_descriptions here would be nice to tell what to do, as in should you do /something or something, or what if you want to leave it empty

@mib1185
Copy link
Contributor

mib1185 commented Jan 30, 2025

these are the backup related strings - they need to be also referenced in the options-flow strings

"backup_share": {
"title": "Synology DSM: Backup location",
"data": {
"backup_share": "Shared folder",
"backup_path": "Path"
},
"data_description": {
"backup_share": "Select the shared folder, where the automatic Home-Assistant backup should be stored.",
"backup_path": "Define the path on the selected shared folder (will automatically be created, if not exist)."
}

@Mariusthvdb
Copy link
Contributor

my Synology backup was just created successfully, but I cant remember seeing an option to chose a dedicated folder....
its just going to the shared folder I created in the network storage config, and which pops up in the backup locations

@mib1185
Copy link
Contributor

mib1185 commented Jan 30, 2025

missing translations for options-flow will be fixed with #136931 (suggestions for improvements are welcome!)

@mib1185
Copy link
Contributor

mib1185 commented Jan 30, 2025

@Mariusthvdb with the upcoming 2025.2 you will be able to use the Synology as a backup location, without the need to add it as a network drive to HA

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Jan 30, 2025

o but I am in the 2025.2 beta, and didnt see it s an option ( I have my Synology integration set up), so I figured Id add it as a share....

let me see how to get it in there without that

update

found it (thanks Joost), under the configure button of the Synology integration ...

@mib1185
Copy link
Contributor

mib1185 commented Jan 30, 2025

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Jan 30, 2025

nice. if I may make 2 suggestions:

  • add an example of a subfolder on the selected share with the correct syntax and characters for the folder selection
  • would be great if all core Backup location providers would be linked in the Backup documentation too.

@piitaya
Copy link
Member

piitaya commented Jan 30, 2025

Is there a way to put the backups are the root level of the share folders (no path)?

@mib1185
Copy link
Contributor

mib1185 commented Jan 30, 2025

Is there a way to put the backups are the root level of the share folders (no path)?

not at the moment - the backup path is mandatory, so one can store backups of multiple instances on the same nas

  • add an example of a subfolder on the selected share with the correct syntax and characters for the folder selection

an example has been added to home-assistant/home-assistant.io#37212

@mib1185
Copy link
Contributor

mib1185 commented Jan 31, 2025

Hi @jlpouffier
the documentation has been improved and the translation strings got fixed. Would be great if you could have another look into this.
Thx 👍

@KNXBroker
Copy link
Contributor

btw. the backup path is a relativ path on the selected shared folder, so no prefixing with . or / is neccessary

Made the same mistake and entered a prefix, which will not be noticed until backup fails. Can this be corrected anyhow automatically? Best regards

@mib1185
Copy link
Contributor

mib1185 commented Feb 3, 2025

The synology_dsm documentation has been massively improved about the backup topic, this also contains now examples how to setup the backup function and how to define the backup path

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Feb 4, 2025

still having massive issues with the Synology option, and breaking backup completely as a consequence. I reported it in the #beta channel on Discord at https://discord.com/channels/330944238910963714/427516175237382144/1336228026849169483 and following

cut it short:
Ha breaks on the network share, that is no longer there, and does not create any backup on any of the other configured locations.
None of the interfaces to Synology display the drive connection, that is currently asleep/offline, but it also shows 0 backups available (which is not the case, as all of the older backups are still around)

It does show the DSM in the backup locations which was configured via the integration , but it does Not show it was configured in the config flow, nor is the option available now (as the DSM is still asleep)

Paul mentions it probably still has the formerly configured network share in the backend somewhere not being cleaned up. But the enduser has no means of seeing that anywhere.

As I just found out:it seems the integrations creates an actual folder (configured in the path) and it does not use the manually created folder with the exact same name. So we can not point it to an existing folder in the share?

@mib1185
Copy link
Contributor

mib1185 commented Feb 4, 2025

The network share based backup is not related to the Synology DSM integration. The network drive is managed by the Supervisor and independent on any specific integration, it is based on common network share protocols like cifs or nfs.

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Feb 4, 2025

yes, I am aware,.
However, my current setup is using the backup option of the Synology integration.

the config flow does not show the configured backup option, when the Synology is asleep.
It would be much clearer if it would show it, but with a warning it's currently not available/offline.

Why I got the error I got is still unclear, as it cant have originated the previously configured network share, as that too was no longer configured...

What did happen is clear however: the backup process was completely broken, and no backups were created, in any of the configured locations.

@EinSchwerd
Copy link

I just updated to version 2025.2. I have Synology DSM integration installed from earlier but backing up to Synology does not show up in the backup section. I can't see anything suspicious in the logs. What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants