[Errno 7] Argument list too long: 'xxh64sum' #866

Closed
opened 2024-05-15 14:23:33 +00:00 by michaeltoohig · 4 comments

What I'm trying to do and why

Create a new archive. Every day I run backup via cron and I am receiving a fail alert but this did not occur the first time I made a full backup only the 2nd and 3rd night so far. If I had to guess knowing xxhash is for comparing files it may be my spot check config failing to run. Is this a bug or am I comparing too many files, my config has a 10% compare configured.

Steps to reproduce

Create a new archive with the following config.

source_directories:
  - /mnt/source

repositories:
  - path: ssh://xxx@xxx.repo.borgbase.com/./repo
    label: borgbase-family-photos

one_file_system: false
archive_name_format: 'backup-{utcnow}'

exclude_if_present:
  - .nobackup
  - .NOBACKUP

keep_daily: 7
keep_weekly: 8
keep_monthly: 6
keep_yearly: 2

checks:
  - name: repository
    frequency: 1 month
  - name: archives
    frequency: 1 month
  - name: spot
    frequency: 1 week
    count_tolerance_percentage: 10
    data_sample_percentage: 10
    data_tolerance_percentage: 0.5

check_last: 3

before_everything:
  - echo "Starting a backup job."
after_everything:
  - echo "Backup created."
on_error:
  - echo "Error while creating a backup."

apprise:
  services:
    - url: tgram://xxx:xxx_xxx/xxx/
      label: telegram

  states:
    - start
    - finish
    - fail

Actual behavior

After the backup is complete the following error occurs which raises an fail message to my notifications.

CRITICAL:None:borgbase-family-photos: Error running actions for repository
CRITICAL:None:[Errno 7] Argument list too long: 'xxh64sum'
ERROR:borgmatic.execute:Error while creating a backup.
CRITICAL:None:/etc/borgmatic.d/config.yaml: An error occurred
WARNING:borgmatic.execute:Backup created.
CRITICAL:None:
CRITICAL:None:summary:
CRITICAL:None:/etc/borgmatic.d/config.yaml: An error occurred
CRITICAL:None:borgbase-family-photos: Error running actions for repository
CRITICAL:None:[Errno 7] Argument list too long: 'xxh64sum'
CRITICAL:borgmatic.commands.borgmatic:
CRITICAL:borgmatic.commands.borgmatic:Need some help? https://torsion.org/borgmatic/#issues

Expected behavior

No issue with xxh64sum.

Other notes / implementation ideas

No response

borgmatic version

1.8.11

borgmatic installation method

container

Borg version

1.2.8

Python version

3.12.3

Database version (if applicable)

mysql Ver 15.1 Distrib 10.11.6-MariaDB, for Linux (x86_64) using readline 5.1

Operating system and version

Alpine 3.19

### What I'm trying to do and why Create a new archive. Every day I run backup via cron and I am receiving a `fail` alert but this did not occur the first time I made a full backup only the 2nd and 3rd night so far. If I had to guess knowing xxhash is for comparing files it may be my spot check config failing to run. Is this a bug or am I comparing too many files, my config has a 10% compare configured. ### Steps to reproduce Create a new archive with the following config. ``` source_directories: - /mnt/source repositories: - path: ssh://xxx@xxx.repo.borgbase.com/./repo label: borgbase-family-photos one_file_system: false archive_name_format: 'backup-{utcnow}' exclude_if_present: - .nobackup - .NOBACKUP keep_daily: 7 keep_weekly: 8 keep_monthly: 6 keep_yearly: 2 checks: - name: repository frequency: 1 month - name: archives frequency: 1 month - name: spot frequency: 1 week count_tolerance_percentage: 10 data_sample_percentage: 10 data_tolerance_percentage: 0.5 check_last: 3 before_everything: - echo "Starting a backup job." after_everything: - echo "Backup created." on_error: - echo "Error while creating a backup." apprise: services: - url: tgram://xxx:xxx_xxx/xxx/ label: telegram states: - start - finish - fail ``` ### Actual behavior After the backup is complete the following error occurs which raises an `fail` message to my notifications. ``` CRITICAL:None:borgbase-family-photos: Error running actions for repository CRITICAL:None:[Errno 7] Argument list too long: 'xxh64sum' ERROR:borgmatic.execute:Error while creating a backup. CRITICAL:None:/etc/borgmatic.d/config.yaml: An error occurred WARNING:borgmatic.execute:Backup created. CRITICAL:None: CRITICAL:None:summary: CRITICAL:None:/etc/borgmatic.d/config.yaml: An error occurred CRITICAL:None:borgbase-family-photos: Error running actions for repository CRITICAL:None:[Errno 7] Argument list too long: 'xxh64sum' CRITICAL:borgmatic.commands.borgmatic: CRITICAL:borgmatic.commands.borgmatic:Need some help? https://torsion.org/borgmatic/#issues ``` ### Expected behavior No issue with `xxh64sum`. ### Other notes / implementation ideas _No response_ ### borgmatic version 1.8.11 ### borgmatic installation method container ### Borg version 1.2.8 ### Python version 3.12.3 ### Database version (if applicable) mysql Ver 15.1 Distrib 10.11.6-MariaDB, for Linux (x86_64) using readline 5.1 ### Operating system and version Alpine 3.19
Owner

Thanks so much for filing this. Yes, this is ostensibly a bug with the spot check. It looks like xxh64sum can't handle more than a certain number of files at once. Until this is fixed, you can try lowering your data_sample_percentage as a work-around.

Thanks so much for filing this. Yes, this is ostensibly a bug with the `spot` check. It looks like `xxh64sum` can't handle more than a certain number of files at once. Until this is fixed, you can try lowering your `data_sample_percentage` as a work-around.
witten added the
bug
label 2024-05-15 16:12:09 +00:00
Author

Thanks for the confirmation :)

Thanks for the confirmation :)
Owner

This has been fixed in main and will be part of the next release. This fix is performed by batching calls to xxh64sum (and also to Borg) so that it works on only 10,000 files at a time, looping as necessary to get through all the files that need hashing as part of this check. It's possible this could still error on some systems or when using super long filenames, so please let me know if you still see errors when this is released.

Thanks again for bringing this to my attention!

This has been fixed in main and will be part of the next release. This fix is performed by batching calls to xxh64sum (and also to Borg) so that it works on only 10,000 files at a time, looping as necessary to get through all the files that need hashing as part of this check. It's possible this could still error on some systems or when using super long filenames, so please let me know if you still see errors when this is released. Thanks again for bringing this to my attention!
Owner

Released in borgmatic 1.8.12!

Released in borgmatic 1.8.12!
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#866
No description provided.