thomasmauerer / hassio-addons

My collection of addons for Home Assistant
MIT License
452 stars 53 forks source link

Backup finished, but not uploaded to Synology NAS #151

Open proasnet opened 1 year ago

proasnet commented 1 year ago

Hi, I tried your addon. I have configured NAS with shared folder /volume2/backups/ha-backup Config addon is:

host: 192.168.0.250
share: backups
target_dir: ha-backup
username: homeassistant
password: xxxxxxx
keep_local: "3"
keep_remote: "3"
trigger_time: "00:00"
trigger_days:
  - Mon
  - Thu
  - Sun
exclude_addons: []
exclude_folders: []
workgroup: WORKGROUP
backup_name: "{type} Backup {date}"
log_level: debug

The startup log of addon is:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
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: Samba Backup
 Create backups and store them on a Samba share
-----------------------------------------------------------
 Add-on version: 5.2.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.2  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.5.4
 Home Assistant Supervisor: 2023.04.1
-----------------------------------------------------------
 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
s6-rc: info: service legacy-services successfully started
[23-06-01 10:38:06] INFO: ---------------------------------------------------
[23-06-01 10:38:06] INFO: Host/Share: 192.168.0.250/backups
[23-06-01 10:38:06] INFO: Target directory: ha-backup
[23-06-01 10:38:06] INFO: Keep local/remote: 3/3
[23-06-01 10:38:06] INFO: Trigger time: 00:00
[23-06-01 10:38:06] INFO: Trigger days: Mon Thu Sun
[23-06-01 10:38:06] INFO: ---------------------------------------------------
[23-06-01 10:38:07] DEBUG: Backups local/remote: 2/0
[23-06-01 10:38:07] DEBUG: Total backups succeeded/failed: 0/1
[23-06-01 10:38:07] DEBUG: Last backup: never
[23-06-01 10:38:09] DEBUG: putting file samba-tmp123 as \ha-backup\samba-tmp123 (0.0 kb/s) (average 0.0 kb/s)
[23-06-01 10:38:10] DEBUG: Posting sensor data to API at /core/api/states/sensor.samba_backup
[23-06-01 10:38:10] DEBUG: API Status: 200
[23-06-01 10:38:10] DEBUG: API Response: {"entity_id":"sensor.samba_backup","state":"IDLE","attributes":{"friendly_name":"Samba Backup","backups_local":"4","backups_remote":"0","total_backups_succeeded":"0","total_backups_failed":"1","last_backup":"never"},"last_changed":"2023-06-01T01:00:24.521972+00:00","last_updated":"2023-06-01T08:38:10.354710+00:00","context":{"id":"01H1V1PWNJA47WG0RQ0WZ6VJQQ","parent_id":null,"user_id":"644d8a956e874534a1392c98c7fa4143"}}
[23-06-01 10:38:10] INFO: Samba Backup started successfully
[23-06-01 10:38:10] DEBUG: Starting stdin listener ...
[23-06-01 10:38:10] DEBUG: Starting main loop ...

And at night I have this in a log:

[23-06-01 00:00:12] INFO: Creating backup "Full Backup 2023-06-01 00:00"
parse error: Invalid numeric literal at line 1, column 5
[23-06-01 03:00:14] DEBUG: Posting sensor data to API at /core/api/states/sensor.samba_backup
[23-06-01 03:00:14] DEBUG: API Status: 200
[23-06-01 03:00:14] DEBUG: API Response: {"entity_id":"sensor.samba_backup","state":"FAILED","attributes":{"friendly_name":"Samba Backup","backups_local":"2","backups_remote":"0","total_backups_succeeded":"0","total_backups_failed":"1","last_backup":"never"},"last_changed":"2023-06-01T01:00:14.106799+00:00","last_updated":"2023-06-01T01:00:14.106799+00:00","context":{"id":"01H1T7GCCT07CAXWN3FK7ASB9A","parent_id":null,"user_id":"644d8a956e874534a1392c98c7fa4143"}}
[23-06-01 03:00:24] DEBUG: Posting sensor data to API at /core/api/states/sensor.samba_backup
[23-06-01 03:00:24] DEBUG: API Status: 200
[23-06-01 03:00:24] DEBUG: API Response: {"entity_id":"sensor.samba_backup","state":"IDLE","attributes":{"friendly_name":"Samba Backup","backups_local":"2","backups_remote":"0","total_backups_succeeded":"0","total_backups_failed":"1","last_backup":"never"},"last_changed":"2023-06-01T01:00:24.521972+00:00","last_updated":"2023-06-01T01:00:24.521972+00:00","context":{"id":"01H1T7GPJ9GKQB3P7HPH6GD1H0","parent_id":null,"user_id":"644d8a956e874534a1392c98c7fa4143"}}
[23-06-01 03:00:24] INFO: Backup finished

Backup in HA is located, but not in a NAS.

BenBergman commented 9 months ago

I'm getting the parse error: Invalid numeric literal error too. Did you ever find a fix for it?

bcutter commented 8 months ago

Can you @proasnet confirm this: of which size are your backups?

I see similar behavior for backups with file size of roughly 4 GB. See https://github.com/thomasmauerer/hassio-addons/issues/161.

proasnet commented 8 months ago

Hi, addon now working fine.

host: 192.168.0.250
share: backups
target_dir: ha-backup
username: homeassistant
password: xxxxxxxx
keep_local: all
keep_remote: all
trigger_time: "03:00"
trigger_days:
  - Mon
  - Wed
  - Fri
  - Sun
exclude_addons: []
exclude_folders: []

obrazek

bcutter commented 8 months ago

OK your screenshot answers the question: no, your backups are not equal to or bigger than 4 GB.