Sebclem / hassio-nextcloud-backup

Hass.io Add-on: Backup your snapshots to Nextcloud
GNU General Public License v3.0
118 stars 15 forks source link

The upload does not work #188

Closed 7system7 closed 1 year ago

7system7 commented 1 year ago

Describe the bug I set up the whole system. Then, I would like to upload my fist backup. The directories created successfully but the files cannot be uploaded.

Expected behavior Upload successfully.

System log

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
fix-attrs: info: applying /etc/fix-attrs.d/10-run
fix-attrs: warning: fix-attrs is deprecated, please fix volume permissions in your container manager instead
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: Nextcloud Backup
 Easily upload your Home Assistant backups to Nextcloud
-----------------------------------------------------------
 Add-on version: 0.17.6
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.2  (amd64 / qemux86-64)
 Home Assistant Core: 2022.10.4
 Home Assistant Supervisor: 2022.10.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
Log level is set to DEBUG
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun nextcould_backup (no readiness notification)
s6-rc: info: service legacy-services successfully started
[11:31:00] INFO: Starting Node...
[2022-10-20 11:31:01] [info]:   Log level: debug
[2022-10-20 11:31:01] [info]:   Backup timeout: 5400000
[2022-10-20 11:31:01] [info]:   Satus : Go !
[2022-10-20 11:31:01] [info]:   Initializing and checking webdav client...
[2022-10-20 11:31:01] [info]:   Starting auto clean cron...
[2022-10-20 11:31:01] [info]:   Starting Cron...
[2022-10-20 11:31:01] [info]:   Hassio API : Go !
[2022-10-20 11:31:01] [debug]:  Nextcloud connection:  Success !
[2022-10-20 11:31:02] [debug]:  Path /+Home/ already exist.
[2022-10-20 11:31:02] [debug]:  Path /+Home/HomeAssistantBackup/ already exist.
[2022-10-20 11:31:03] [info]:   Nextcloud connection : Go !
[2022-10-20 11:31:08] [info]:   Downloading snapshot 6c220b13...
[2022-10-20 11:31:08] [debug]:  Snapshot size: 37.93
[2022-10-20 11:31:08] [info]:   Download success !
[2022-10-20 11:31:08] [debug]:  Snapshot dl size : 37.9296875
[2022-10-20 11:31:08] [info]:   Uploading snap...
[2022-10-20 11:31:08] [debug]:  ...URI: http://host.hiden/remote.php/webdav/+Home/HomeAssistantBackup/Manual/Manual-2022.10.4-2022-10-20_1128.tar
[2022-10-20 11:31:08] [error]:  Fail to upload snapshot to nextcloud (Error: write EPIPE) !
[2022-10-20 11:31:08] [error]:  Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
vincegre commented 1 year ago

Same here since ages but never got a solution :( Think it's time to find a better addon for backup as this one is not reliable at all even stating backup has run fine while he has failed to upload it :-1:

Sebclem commented 1 year ago

@7system7 The EPIPE error means that the add-on try to write into a broken pipe.

This can be caused by a communication issue between this add-on and your Nextcloud instance.

This can also be caused by Nextcloud, PHP, or Apache/Nginx closing the connection because the payload (backup) is bigger than the max body size or stream size.

Try take a look to logs of your Nextcloud, apache/nginx or reverse proxy if any

7system7 commented 1 year ago

@Sebclem The size cannot be a problem, because I use the same Nextcloud instance w/ several users, who use much bigger files.

But OK, I will check the logs out. Thanks.

Sebclem commented 1 year ago

Let me know if you see any clues, this can also be caused by a missing headers or other.

7system7 commented 1 year ago

Oh, lol! the trick was this:

Screenshot from 2022-10-24 11-34-47

I don't want to speak unworthy, but in 2022, this function should be switched on by-default... Just a suggestion. :laughing:

Thank you for your work!

Sebclem commented 1 year ago

Yes good point 👍 I will change this