jcwillox / hassio-rclone-backup

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

failed to rename backups, aborting upload: archive/tar: invalid tar header #51

Closed Erudition closed 4 months ago

Erudition commented 6 months ago

The problem

My first cron-scheduled backup did not run, and there's a log entry as shown in the title.

What version of Rclone Backup has the issue?

3.1.0

What version of Home Assistant are you running?

2024.3.1

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?

2024.03.0

Example YAML snippet

- name: Sync Daily Backups
  schedule: 10 4 * * *
  command: sync
  sources:
    - /backup
  destination: Proton: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.1  (aarch64 / green)
 Home Assistant Core: 2024.3.1
 Home Assistant Supervisor: 2024.03.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
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
[13:49:43] INFO: Installed rclone version:
[13:49:43] INFO: Starting Rclone Web GUI...
2024/03/19 13:49:44 NOTICE: Serving files from "/usr/share/rclone-webui-react"
2024/03/19 13:49:44 NOTICE: Serving remote control on http://[::]:8099/
2024/03/19 13:49:44 NOTICE: Web GUI is not automatically opening browser. Navigate to http://[::]:8099/ to use.
[13:49:44] INFO: rclone v1.65.0
- os/version: alpine 3.16.0 (64 bit)
- os/kernel: 6.6.20-haos (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.21.4
- go/linking: static
- go/tags: none
[13:49:44] INFO: Starting Scheduler...
[2024-03-19] [13:49:44] [INFO]: rclone config found
[2024-03-19] [13:49:44] [INFO]: checking job configs...
[2024-03-19] [13:49:44] [INFO]: scheduled jobs:
10 4 * * * sync "Sync Daily Backups"; /backup -> Proton:Backup/Home Assistant/
failed to rename backups, aborting upload: archive/tar: invalid tar header

Additional information

No response

jamesmyatt commented 6 months ago

Your backup file is probably corrupt due to running out of disk space. Can you check your supervisor logs?

Cl3tus commented 4 months ago

Hello, i can confirm the above. I had the same issues with invalid tar header. This was due to the fact i forgot to exclude Frigate from my backup. And each backup would fill up atleast 55gb. After a few backups my whole drive did a booboo. I excluded Frigate, Removed all backups via SMB /backup, and retested with new backups. All good now.

[2024-05-11] [15:38:17] [INFO]: scheduled jobs:
39 4,10,15,22 * * * sync "Sync Daily Backups"; /backup -> OneDrive:/Home Automation/Backups
[2024-05-11] [15:39:00] [INFO]: running "Sync Daily Backups"; /backup -> OneDrive:/Home Automation/Backups
[2024-05-11] [15:39:00] [INFO]: renamed 1 backups
2024/05/11 15:40:00 INFO  : 
Transferred:          880 MiB / 1.892 GiB, 45%, 14.311 MiB/s, ETA 1m13s
Transferred:            0 / 1, 0%
Elapsed time:       1m0.3s
Transferring:
 *  Hourly_Backup_Saturday_11_May_2024_15_37.tar: 45% /1.892Gi, 14.313Mi/s, 1m13s

2024/05/11 15:41:00 INFO  : 
Transferred:        1.708 GiB / 1.892 GiB, 90%, 14.939 MiB/s, ETA 12s
Transferred:            0 / 1, 0%
Elapsed time:       2m0.3s
Transferring:
 *  Hourly_Backup_Saturday_11_May_2024_15_37.tar: 90% /1.892Gi, 14.939Mi/s, 12s

2024/05/11 15:41:14 INFO  : Hourly_Backup_Saturday_11_May_2024_15_37.tar: Copied (new)
2024/05/11 15:41:14 INFO  : 
Transferred:        1.892 GiB / 1.892 GiB, 100%, 14.358 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:      2m14.2s

[2024-05-11] [15:41:14] [INFO]: unrenamed 1 backups
[2024-05-11] [15:41:14] [INFO]: finished in 2m14s
jcwillox commented 4 months ago

Glad you got to the solution, if I have some time I might make a troubleshooting section for this issue, it seems to trip people up quite often, and maybe add more info to the error message 👍

I'm going to close this as it seems resolved.