Failed backup with minimal error output #553

Closed
opened 2022-06-28 18:39:25 +00:00 by pikeas · 4 comments

What I'm trying to do and why

Run my first Borgmatic backup.

Steps to reproduce (if a bug)

$ borgmatic -v 2 --files
summary:
/Users/<user>/.config/borgmatic/config.yaml: Error running configuration file
ssh://<host>/./backups/<repo>: Error running actions for repository
...
A <file>
RemoteRepository: 154.15 MB bytes sent, 5.73 kB bytes received, 312 messages sent
Local Exception
Traceback (most recent call last):
Command 'borg create --exclude-from /var/folders/tk/<random id> --compression zstd,3 --list --filter AME- --debug --show-rc ssh://<host>/./backups/<repo>::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} <folder>' returned non-zero exit status 2.
location:
    source_directories:
        - /Users/<user>
    repositories:
        - ssh://<host>/./backups/<repo>
    exclude_patterns:
        - junk
storage:
    encryption_passphrase: "<secret>"
    compression: zstd,3
retention:
    keep_daily: 7
    keep_weekly: 4
    keep_monthly: 12
    keep_yearly: 5

Actual behavior (if a bug)

See above, backup has failed with no specific error messages.

Expected behavior (if a bug)

Backup succeeds, or fails with additional output.

Environment

borgmatic version: 1.6.4
borgmatic installation method: pipx
Borg version: 1.2.1
Python version: 3.10.5
operating system and version: MacOS Monterey 12.3.1

#### What I'm trying to do and why Run my first Borgmatic backup. #### Steps to reproduce (if a bug) ``` $ borgmatic -v 2 --files summary: /Users/<user>/.config/borgmatic/config.yaml: Error running configuration file ssh://<host>/./backups/<repo>: Error running actions for repository ... A <file> RemoteRepository: 154.15 MB bytes sent, 5.73 kB bytes received, 312 messages sent Local Exception Traceback (most recent call last): Command 'borg create --exclude-from /var/folders/tk/<random id> --compression zstd,3 --list --filter AME- --debug --show-rc ssh://<host>/./backups/<repo>::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} <folder>' returned non-zero exit status 2. ``` ``` location: source_directories: - /Users/<user> repositories: - ssh://<host>/./backups/<repo> exclude_patterns: - junk storage: encryption_passphrase: "<secret>" compression: zstd,3 retention: keep_daily: 7 keep_weekly: 4 keep_monthly: 12 keep_yearly: 5 ``` #### Actual behavior (if a bug) See above, backup has failed with no specific error messages. #### Expected behavior (if a bug) Backup succeeds, or fails with additional output. #### Environment **borgmatic version:** 1.6.4 **borgmatic installation method:** pipx **Borg version:** 1.2.1 **Python version:** 3.10.5 **operating system and version:** MacOS Monterey 12.3.1
Owner

Thanks for taking the time to report this! It looks like Borg is experiencing an internal error and borgmatic is swallowing most of the traceback instead of forwarding it on to the user. I have come up with a local repro by forcing a Borg error, so I can look into why borgmatic is truncating the traceback.

In the meantime, you can run the Borg command directly to get the full Borg traceback:

borg create --exclude-from /var/folders/tk/<random id> --compression zstd,3 --list --filter AME- --debug --show-rc ssh://<host>/./backups/<repo>::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} <folder>

... replacing <random id>, <host>, <repo>, and <folder>, of course.

Thanks for taking the time to report this! It looks like Borg is experiencing an internal error and borgmatic is swallowing most of the traceback instead of forwarding it on to the user. I have come up with a local repro by forcing a Borg error, so I can look into why borgmatic is truncating the traceback. In the meantime, you can run the Borg command directly to get the full Borg traceback: ```bash borg create --exclude-from /var/folders/tk/<random id> --compression zstd,3 --list --filter AME- --debug --show-rc ssh://<host>/./backups/<repo>::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} <folder> ``` ... replacing `<random id>`, `<host>`, `<repo>`, and `<folder>`, of course.
witten added the
bug
label 2022-06-28 19:57:33 +00:00
Owner

Okay, this should be fixed in master—at least the borgmatic swallowing the Borg error part. The problem was that borgmatic stopped reading the Borg process output as soon as Borg exited with an error, leaving some of the traceback unread. There was code to account for this situation, but it wasn't doing its job and has been replaced.

The underlying Borg traceback is still probably present on your system, but it should hopefully be easier to debug now. Let me know if I can provide any help with it.

The fix will be part of the next borgmatic release. Thanks again for reporting it!

Okay, this should be fixed in master—at least the borgmatic swallowing the Borg error part. The problem was that borgmatic stopped reading the Borg process output as soon as Borg exited with an error, leaving some of the traceback unread. There *was* code to account for this situation, but it wasn't doing its job and has been replaced. The underlying Borg traceback is still probably present on your system, but it should hopefully be easier to debug now. Let me know if I can provide any help with it. The fix will be part of the next borgmatic release. Thanks again for reporting it!
Author

Wow, fantastic response and phenomenal turnaround time, thank you!

Wow, fantastic response and phenomenal turnaround time, thank you!
Owner

Fix released in borgmatic 1.6.5!

Fix released in borgmatic 1.6.5!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

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