jcwillox / hassio-rclone-backup

Home Assistant addon to automatically sync backups to remote locations using Rclone
MIT License
99 stars 18 forks source link

[ERROR]: failed to rename backups, aborting upload: archive/tar: invalid tar header #55

Closed Qwertzt closed 1 month ago

Qwertzt commented 2 months ago

The problem

Hello,

After initially encountering some issues setting up rclone on my HA Green with HA OS, I have managed to establish a connection to HiDrive. I have a WEB-DEV access there and 1TB of cloud storage available. However, I've encountered a setback in that I'm unable to perform a backup. Despite searching through documentation and online resources, I haven't been able to find a solution. While I did find some messages in the Supervisor log, they seem to be unrelated to the backup issue and occurred at different times. Nonetheless, they may provide some clues to the problem.

What version of Rclone Backup has the issue?

3.1.0

What version of Home Assistant are you running?

Home Assistant OS 12.2

What type of installation are you running?

Home Assistant OS

If you're running HA OS/Supervised, what version of the Supervisor are you running?

Home Assistant Supervisor: 2024.04.0

Example YAML snippet

- name: Sync Daily Backups
  schedule: 45 16 * * *
  command: sync
  sources:
    - /backup
  destination: HA-Cloud-Storage:/Backup/Home Assistant
  include: []
  exclude: []
  flags: {}

Anything in the logs that might be useful for us?

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: Rclone Backup
 Automatically sync backup to remote locations using rclone
-----------------------------------------------------------
 Add-on version: 3.1.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.2  (aarch64 / green)
 Home Assistant Core: 2024.4.3
 Home Assistant Supervisor: 2024.04.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
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/init.sh
cont-init: info: /etc/cont-init.d/init.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 rclone (no readiness notification)
services-up: info: copying legacy longrun scheduler (no readiness notification)
s6-rc: info: service legacy-services successfully started
[15:24:36] INFO: Installed rclone version:
[15:24:36] INFO: Starting Rclone Web GUI...
2024/04/21 15:24:42 NOTICE: Serving files from "/usr/share/rclone-webui-react"
2024/04/21 15:24:42 NOTICE: Serving remote control on http://[::]:8099/
2024/04/21 15:24:42 NOTICE: Web GUI is not automatically opening browser. Navigate to http://[::]:8099/ to use.
[15:24:42] INFO: rclone v1.65.0
- os/version: alpine 3.16.0 (64 bit)
- os/kernel: 6.6.25-haos (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.21.4
- go/linking: static
- go/tags: none
[15:24:42] INFO: Starting Scheduler...
[2024-04-21] [15:24:43] [INFO]: rclone config found
[2024-04-21] [15:24:43] [INFO]: checking job configs...
[2024-04-21] [15:24:43] [INFO]: scheduled jobs:
45 16 * * * sync "Sync Daily Backups"; /backup -> HA-Cloud-Storage:/Backup/Home Assistant
[2024-04-21] [16:45:00] [INFO]: running "Sync Daily Backups"; /backup -> HA-Cloud-Storage:/Backup/Home Assistant
[2024-04-21] [16:45:00] [ERROR]: failed to rename backups, aborting upload: archive/tar: invalid tar header

Additional information

2024-04-21 14:50:43.800 INFO (MainThread) [supervisor.backups.manager] Found 55 backup files 2024-04-21 14:50:44.300 ERROR (MainThread) [supervisor.backups.backup] Can't read backup tarfile /data/backup/f5e46bac.tar: "filename './backup.json' not found" 2024-04-21 14:50:45.282 ERROR (MainThread) [supervisor.backups.backup] Can't read backup tarfile /data/backup/3a2631c1.tar: "filename './backup.json' not found" 2024-04-21 14:50:45.915 INFO (MainThread) [supervisor.backups.manager] Found 55 backup files 2024-04-21 14:50:46.177 ERROR (MainThread) [supervisor.backups.backup] Can't read backup tarfile /data/backup/f5e46bac.tar: "filename './backup.json' not found" 2024-04-21 14:50:46.363 ERROR (MainThread) [supervisor.backups.backup] Can't read backup tarfile /data/backup/3a2631c1.tar: "filename './backup.json' not found" 2024-04-21 14:51:28.271 INFO (MainThread) [supervisor.backups.manager] Found 55 backup files 2024-04-21 14:51:28.502 ERROR (MainThread) [supervisor.backups.backup] Can't read backup tarfile /data/backup/f5e46bac.tar: "filename './backup.json' not found" 2024-04-21 14:51:28.686 ERROR (MainThread) [supervisor.backups.backup] Can't read backup tarfile /data/backup/3a2631c1.tar: "filename './backup.json' not found" 2024-04-21 14:51:28.821 INFO (MainThread) [supervisor.backups.manager] Found 55 backup files 2024-04-21 14:51:29.140 ERROR (MainThread) [supervisor.backups.backup] Can't read backup tarfile /data/backup/f5e46bac.tar: "filename './backup.json' not found" 2024-04-21 14:51:29.212 ERROR (MainThread) [supervisor.backups.backup] Can't read backup tarfile /data/backup/3a2631c1.tar: "filename './backup.json' not found"

jamesmyatt commented 2 months ago

When I had an issue like this, it was due to the backups being corrupted by running out of disk space when they were being made. I think the only solution is to just delete them (via SSH Terminal or samba), which also increases your free space. They won't appear in the "backups" tab in HA because they're corrupt.

Qwertzt commented 2 months ago

Hallo James,

thank you for the notice. I've added an external SSD of approximately 500GB to my HA Green, which was quite close to its limit due to backups and Frigate. I used the terminal to delete backups, which were more present in the terminal than in the Supervisor interface, and other things. Now, the drive is mostly empty. According to the log, everything has run through, but unfortunately, there is nothing to be found on HiDrive.

`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: Rclone Backup Automatically sync backup to remote locations using rclone

Add-on version: 3.1.0 You are running the latest version of this add-on. System: Home Assistant OS 12.2 (aarch64 / green) Home Assistant Core: 2024.4.4 Home Assistant Supervisor: 2024.04.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 cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0 cont-init: info: running /etc/cont-init.d/init.sh cont-init: info: /etc/cont-init.d/init.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 rclone (no readiness notification) services-up: info: copying legacy longrun scheduler (no readiness notification) s6-rc: info: service legacy-services successfully started [11:35:26] INFO: Installed rclone version: [11:35:26] INFO: Starting Rclone Web GUI... 2024/04/25 11:35:34 NOTICE: Serving files from "/usr/share/rclone-webui-react" 2024/04/25 11:35:34 NOTICE: Serving remote control on http://[::]:8099/ 2024/04/25 11:35:34 NOTICE: Web GUI is not automatically opening browser. Navigate to http://[::]:8099/ to use. [11:35:34] INFO: rclone v1.65.0

[2024-04-25] [11:36:01] [INFO]: unrenamed 1 backups [2024-04-25] [11:36:01] [INFO]: finished in 1.48s 2024-04-25 13_54_08-Window `

jamesmyatt commented 1 month ago

Is this a duplicate of #51?

Qwertzt commented 1 month ago

Ist das ein Duplikat von #51?

Hello,

Thank you for pointing out that this issue bears similarities to a previously reported one. Thanks to your help, I was able to fix this error, and it now indicates that the transfer is supposedly taking place. Unfortunately, files still do not seem to be copied to HiDrive as expected.

I will continue to work on finding a solution. Your ongoing feedback is greatly appreciated. If you have further insights or information, please do not hesitate to share them.

Best regards, [Your Name]

Cl3tus commented 1 month ago

Hello, See my answer in https://github.com/jcwillox/hassio-rclone-backup/issues/51#issuecomment-2105758193

jcwillox commented 1 month ago

Yep it's almost always corrupted backups, or if for some reason you put other .tar files in the folder that aren't backups it could also cause issues.

Also in that last set of logs dry run was enabled so if that wasn't intentional it would prevent anything actually being copied to the remote.

Qwertzt commented 1 month ago

Hey folks,

Just a quick heads-up: All good now! Big thanks to everyone who pitched in, we got this sorted!

Honestly, it wasn't just one or two, but a whopping three problems – talk about a wild ride! The first hurdle was tackled by jamesmyatt. Turns out, there were some real pesky corrupt files causing havoc.

Then there was the second snag, fixed up by jcwillox – just a little setting snafu. Dry run was activated, but that's all sorted now.

And last but not least, the third problem? Well, that one was on me, it seems. But hey, we live and learn, right?

Everything's running like a dream now. Until next time, folks!