Confusing error messages #623
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#623
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When borgmatic is running and in another window you run another borgmatic command, i.e. borgmatic info, it replies with a message saying that was impossible to acquire a lock, which is fine, followed by another error message saying that there is an error in config file that are just non-sense and could lead one to wondering that really is another problem.
Would be nice to just have a siingle message about the lock removing the error message that says "/etc/borgmatic.d/photos.yaml: Error running configuration file" since there is no error on configuration file...
kimera:~ # borgmatic list
/media/miguel/ExternalBackups/borg-backups/windows-pictures: Listing archives
Failed to create/acquire the lock /media/miguel/ExternalBackups/borg-backups/windows-pictures/lock.exclusive (timeout).
/media/miguel/ExternalBackups/borg-backups/windows-pictures: Error running actions for repository
Command 'borg list /media/miguel/ExternalBackups/borg-backups/windows-pictures' returned non-zero exit status 2.
/etc/borgmatic.d/photos.yaml: Error running configuration file
...
summary:
/etc/borgmatic.d/photos.yaml: Error running configuration file
/media/miguel/ExternalBackups/borg-backups/windows-pictures: Error running actions for repository
Failed to create/acquire the lock /media/miguel/ExternalBackups/borg-backups/windows-pictures/lock.exclusive (timeout).
Command 'borg list /media/miguel/ExternalBackups/borg-backups/windows-pictures' returned non-zero exit status 2.
Environment
borgmatic version: 1.7.5
borgmatic installation method: RPM
borgbackup-bash-completion-1.2.2-1.1.noarch
borgbackup-1.2.2-1.1.x86_64
borgmatic-1.7.5-1.1.noarch
Borg version: borg 1.2.2
Python version: Python 3.10.9
operating system and version: opensuse tumbleweed
Thanks for taking the time to file this! The current error messages are accurate, although I can see how they are misleading in this case. What's going on is borgmatic runs Borg, which is itself erroring with the "failed to create/acquire lock" message. borgmatic sees that Borg has exited with an error and displays its own "Error running configuration file" message, indicating that something has gone wrong while running through actions for the named configuration file—not that anything is necessarily wrong with the file itself.
So maybe this is just a question of tweaking the phrasing? What do you think of
/etc/borgmatic.d/photos.yaml: Error running actions for configuration file
? Or just/etc/borgmatic.d/photos.yaml: An error occurred
?I guess that tweaking the phrase to "/etc/borgmatic.d/photos.yaml: An error occurred" is more general and don't cause one to misinterpret it as a problem in config.
Funny story, let me give you a background of what occurred so you can have a complete picture:
Today, before leaving to Xmas, we (I and my co-workers) decided to make an extra backup, just because we can.
Than, hours later, I run "borgmatic info" to inspect the destination disk, as a sanity check before running the backup and got those errors.
I spend several minutes (really!) to figure out why the config is wrong and why a lock is in place.
Then I realize that one of my buddies started the backup hours before so this explain the lock out of my knowledge, and so I tought it was a problem in config which is most common! You see ? Se someone don't knows a backup is running, the messages are misleading !
Thank tou !
That totally makes sense. Based on that series of events, I can see how the message would be misleading. I'll tweak the wording to hopefully improve clarity here!
I had the same issue with the phrasing too, I'll work on this if nobody else does, considering this might be a good issue for (even) newer contributors :D
Feel free to pick it up if you want!
Fixed by @diivi in https://github.com/borgmatic-collective/borgmatic/pull/55!
Released in borgmatic 1.7.10!