carstenschroeder / hassio-addons

Hass.io Addon repository
MIT License
19 stars 16 forks source link

Strange scp issue #14

Open DutchessNicole opened 3 years ago

DutchessNicole commented 3 years ago

I'm just getting to grips with Homeassistant and one of the first things I want to do is ensure that I have my configurations stored for the time I inevitably mess it up.

I found it quite tricky to set up the configuration though: I have a synology NAS and it has a rather special way to connect with SFTP/SCP etc... In some cases you need to prepend the volume name, sometimes you don't. Other times you omit the volume but you have to add double slashes at the start.

I've tried a few of these options, and the most promising seems to be the prepending of the volume, however I get an error there that in my opinion shouldn't be an error at all:

[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.
Adding SSH key
Creating local backup: "Automated backup 2021-04-03 17:13"
Backup created: 0ebb3cab
Copying 0ebb3cab.tar to /volume1/Backups/hassio/ on dogevillestor.tech-nicole.lan using SCP
Warning: Permanently added 'dogevillestor.tech-nicole.lan,192.168.4.21' (ECDSA) to the list of known hosts.
scp: /volume1/Backups/hassio/: Is a directory
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Configured with the following:

ssh_enabled: true
ssh_host: dogevillestor.tech-nicole.lan
ssh_port: 22
ssh_user: backup
ssh_key:
  - '!secret backup_ssh_id'
remote_directory: /volume1/Backups/hassio/
zip_password: ''

Why am I getting an error that the target directory is a directory? As far as I can tell it is supposed to be a directory... What am I doing wrong?