KenKundert / emborg

Interactive command line interface to Borg Backup
GNU General Public License v3.0
94 stars 8 forks source link

Timeouts while an archive is mounted #48

Closed stratosgear closed 2 years ago

stratosgear commented 2 years ago

I found out that while you have an archive mounted you get errors while trying to create new backups:

➜ emborg -c linked_path create
emborg error: borg create:
    Failed to create/acquire the lock /home/stratos/borg_backups2/serenity-stratos-linked_path/lock (timeout).

The message was confusing enough and it took me QUITE some time until I figured out that it might be due to the currently mounted archive. Once I emborg unmounted the archive the timeouts were gone.

Can this particular case be captured, and maybe a more informative message shown? Maybe even something "Do you currently have any archives mounted?".

KenKundert commented 2 years ago

That message is produced by Borg and simply passed to the user by Emborg. Anything I could do would be relatively fragile. The best I can do is look for that error message and add a comment if it is returned by Borg. If the error message ever changes, this enhancement could fail.

KenKundert commented 2 years ago

I think this is a good request, and have improved the error message as you suggested. Concerning the fragility, I have added a test that will catch the missing message if Borg decides to change their message. The updated version is available on GitHub.

KenKundert commented 2 years ago

The release that fixes this issue (1.25) has been pushed to pypi.