Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peewee error when adding locked repository. #1449

Closed
PitBullCH opened this issue Oct 31, 2022 · 7 comments
Closed

Peewee error when adding locked repository. #1449

PitBullCH opened this issue Oct 31, 2022 · 7 comments
Labels
type:bug Something doesn't work as intended

Comments

@PitBullCH
Copy link

PitBullCH commented Oct 31, 2022

Description

This is on a Mac Studio running fully patched Venture, Vorta , Borg 1.2.2, connecting in this case to an Rsync.net repo, but happens also with BorgBase repos (I use both).

I was able to reproduce the issue.

I had migrated from an old MacPro 2012 running Catalina to a new Mac Studio running Venture. I had imported the profiles from Catalina. This issue happened each time I tried to re-attach to an existing repo - unlinked the repo, re-linked it with repo name and password, added the ssh key, added "--remote-path=borg1" in the extra Borg args.

Environment

  • OS: Mac Studio
  • Vorta version: 0.8.7
  • Installed from: brew - followed install steps for Borg + macFuse + Vorta
  • Borg version: 1.2.2

Logs

Uncaught exception, please file a report with this text at
https://github.com/borgbase/vorta/issues/new

Traceback (most recent call last):
  File "peewee.py", line 6970, in get
  File "peewee.py", line 4339, in __getitem__
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "application.py", line 228, in react_to_log
  File "peewee.py", line 6522, in get
  File "peewee.py", line 6973, in get
vorta.store.models.BackupProfileModelDoesNotExist: <Model: BackupProfileModel> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."name", "t1"."added_at", "t1"."repo_id", "t1"."ssh_key", "t1"."compression", "t1"."exclude_patterns", "t1"."exclude_if_present", "t1"."schedule_mode", "t1"."schedule_interval_count", "t1"."schedule_interval_unit", "t1"."schedule_fixed_hour", "t1"."schedule_fixed_minute", "t1"."schedule_interval_hours", "t1"."schedule_interval_minutes", "t1"."schedule_make_up_missed", "t1"."validation_on", "t1"."validation_weeks", "t1"."prune_on", "t1"."prune_hour", "t1"."prune_day", "t1"."prune_week", "t1"."prune_month", "t1"."prune_year", "t1"."prune_keep_within", "t1"."new_archive_name", "t1"."prune_prefix", "t1"."pre_backup_cmd", "t1"."post_backup_cmd", "t1"."dont_run_on_metered_networks" FROM "backupprofilemodel" AS "t1" WHERE ("t1"."name" = ?) LIMIT ? OFFSET ?
Params: ['New Repo', 1, 0]

Another example:

2022-10-31 14:07:15,864 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2022-10-31 14:07:15,864 - vorta.keyring.abc - DEBUG - Using VortaDBKeyring
2022-10-31 14:07:22,165 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2022-10-31 14:07:22,166 - vorta.keyring.abc - DEBUG - Using VortaDBKeyring
2022-10-31 14:07:22,166 - vorta.keyring.db - DEBUG - Retrieved password for repo zh1283@zh1283.rsync.net:NAS1-PB
2022-10-31 14:07:48,565 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2022-10-31 14:07:48,565 - vorta.keyring.abc - DEBUG - Using VortaDBKeyring
2022-10-31 14:07:48,565 - vorta.borg.borg_job - DEBUG - Using VortaDBKeyring keyring to store passwords.
2022-10-31 14:07:48,566 - vorta.keyring.db - DEBUG - Retrieved password for repo zh1283@zh1283.rsync.net:NAS1-PB
2022-10-31 14:07:48,571 - vorta.borg.borg_job - INFO - Running command /opt/homebrew/bin/borg info --remote-path=borg1 --info --json --log-json zh1283@zh1283.rsync.net:NAS1-PB
2022-10-31 14:07:51,026 - root - CRITICAL - Uncaught exception, file a report at https://github.com/borgbase/vorta/issues/new
Traceback (most recent call last):
  File "peewee.py", line 6970, in get
  File "peewee.py", line 4339, in __getitem__
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "application.py", line 228, in react_to_log
  File "peewee.py", line 6522, in get
  File "peewee.py", line 6973, in get
vorta.store.models.BackupProfileModelDoesNotExist: <Model: BackupProfileModel> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."name", "t1"."added_at", "t1"."repo_id", "t1"."ssh_key", "t1"."compression", "t1"."exclude_patterns", "t1"."exclude_if_present", "t1"."schedule_mode", "t1"."schedule_interval_count", "t1"."schedule_interval_unit", "t1"."schedule_fixed_hour", "t1"."schedule_fixed_minute", "t1"."schedule_interval_hours", "t1"."schedule_interval_minutes", "t1"."schedule_make_up_missed", "t1"."validation_on", "t1"."validation_weeks", "t1"."prune_on", "t1"."prune_hour", "t1"."prune_day", "t1"."prune_week", "t1"."prune_month", "t1"."prune_year", "t1"."prune_keep_within", "t1"."new_archive_name", "t1"."prune_prefix", "t1"."pre_backup_cmd", "t1"."post_backup_cmd", "t1"."dont_run_on_metered_networks" FROM "backupprofilemodel" AS "t1" WHERE ("t1"."name" = ?) LIMIT ? OFFSET ?
Params: ['New Repo', 1, 0]
2022-10-31 14:07:55,815 - vorta.borg.borg_job - ERROR - Failed to create/acquire the lock /Users/pitfield/.cache/borg/2346a2a27919b101a4b3e7ed1bcda599dc1d0c40f27dc0f515a71f3a8f643877/lock.exclusive (timeout).
@real-yfprojects
Copy link
Collaborator

Firstly borg v1.2.2 is not fullly supported yet. See #1409.
However I don't think this is the reason for your issue.

Can you fill in the bug report template I pasted in to you comment? Click on edit to see the instructions included as html comments.

@PitBullCH
Copy link
Author

PitBullCH commented Oct 31, 2022 via email

@real-yfprojects real-yfprojects added the type:bug Something doesn't work as intended label Nov 1, 2022
@real-yfprojects
Copy link
Collaborator

So there are two problems here: The first problem is that the lock file of the repo you are trying to add isn't acquired - possibly by another process. If there is no process accessing the repository, you can break the lock in the command line.
The second problem is a bug of vorta. It cannot handle the first problem when occurring with newly created repositories.

@real-yfprojects
Copy link
Collaborator

Firstly borg v1.2.2 is not fullly supported yet.

It is now with the newest release v0.8.8.

@PitBullCH
Copy link
Author

Breaking the lock worked, did it for all troublesome repos, all now backed up fine.
Didn't have any further issues with 0.8.7 / 1.2.2, but have now install 0.8.8, all still good.

@PitBullCH
Copy link
Author

All done.

@m3nu
Copy link
Contributor

m3nu commented Sep 14, 2024

Likely fixed via #2073

@m3nu m3nu closed this as completed Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something doesn't work as intended
Projects
None yet
Development

No branches or pull requests

3 participants