vorta icon indicating copy to clipboard operation
vorta copied to clipboard

Vorta won't start

Open DrMartinus opened this issue 8 months ago • 5 comments

Description

Hi, Vorta won't start. I tried the solution given here, but that didn't work. I have vorta 0.10.3-1 installed on Manjaro. I've done quite a few backups using vorta, but now not for a longer time (last time in November '24). I get the following error message when running vorta from the CLI: `2025-03-20 09:21:32,833 - root - CRITICAL - Uncaught exception, file a report at https://github.com/borgbase/vorta/issues/new/choose Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/peewee.py", line 3322, in execute_sql cursor.execute(sql, params or ()) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ sqlite3.IntegrityError: NOT NULL constraint failed: repomodel__tmp__.create_backup_cmd

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/bin/vorta", line 8, in sys.exit(main()) ~~~~^^ File "/usr/lib/python3.13/site-packages/vorta/main.py", line 74, in main init_db(sqlite_db) ~~~~~~~^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/vorta/store/connection.py", line 91, in init_db run_migrations(current_schema, con) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/vorta/store/migrations.py", line 243, in run_migrations _apply_schema_update( ~~~~~~~~~~~~~~~~~~~~^ current_schema, ^^^^^^^^^^^^^^^ ...<5 lines>... ), ^^ ) ^ File "/usr/lib/python3.13/site-packages/vorta/store/migrations.py", line 272, in _apply_schema_update migrate(*operations) ~~~~~~~^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 947, in migrate operation.run() ~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 162, in run self._handle_result(method(*self.args, **kwargs)) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 156, in _handle_result self._handle_result(item) ~~~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 153, in _handle_result result.run() ~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 162, in run self._handle_result(method(*self.args, **kwargs)) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 153, in _handle_result result.run() ~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 162, in run self._handle_result(method(*self.args, **kwargs)) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 156, in _handle_result self.handle_result(item) ~~~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 151, in handle_result self.execute(result) ~~~~~~~~~~~~^^^^^^^^ File "/usr/lib/python3.13/site-packages/playhouse/migrate.py", line 147, in execute self.migrator.database.execute(node) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/lib/python3.13/site-packages/peewee.py", line 3330, in execute return self.execute_sql(sql, params) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/peewee.py", line 3320, in execute_sql with exception_wrapper: ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/peewee.py", line 3088, in exit reraise(new_type, new_type(exc_value, *exc_args), traceback) ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/peewee.py", line 196, in reraise raise value.with_traceback(tb) File "/usr/lib/python3.13/site-packages/peewee.py", line 3322, in execute_sql cursor.execute(sql, params or ()) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ peewee.IntegrityError: NOT NULL constraint failed: repomodel__tmp.create_backup_cmd ` Is there a working solution?

Reproduction

  • [x] I tried to reproduce the issue.
  • [x] I was able to reproduce the issue.

OS

Manjaro testing (uptodate), Plasma 6.3.3

Version of Vorta

0.10.3-1

What did you install Vorta with?

Distribution package

Version of Borg

1.4.0-3

Logs

It's not easy to get the logs from the Settings/About tab, if you can't open the app at all. I have no idea, where I would find the vorta logs in my case, hence above the CLI error-messages.

DrMartinus avatar Mar 20 '25 08:03 DrMartinus

Hey @DrMartinus There seems to be an issue with the database integrity, if you have a backup of settings.db (it should be in a data directory of vorta (mentioned below)) then you could try fixing this by replacing it, like how CheariX mentioned here

Make sure to make a backup of the existing .db file before you do so.

Also you can find the log files here, should be helpful to look into that as well (update the issue with that logs also): If installed via flatpak: ~/.var/app/com.borgbase.Vorta/.local/state/Vorta/log/ If installed from source: ~/.local/share/Vorta/

Let us know how it goes.

VandalByte avatar Mar 20 '25 09:03 VandalByte

I guess you haven't noticed that I referred to the same post to which you are referring. I have tried using a backup of settings.db, that doesn't change anything, unfortunately. That made me wonder if it uses that folder, but since in that folder the automatically created backups accumulate (according to my installation attempts), I guess it's the right one. I have even done a downgrade with no success, which leaves me really troubled. The error message seems to be the same. BTW, there are no logs in the folder ~/.local/share/Vorta/ (at least none with the ending "log" or the term "log" within its name). Just one edit: I can oben settings.db with a sqlite-viewer without problems. There doesn't seem to be any file corruption.

DrMartinus avatar Mar 21 '25 09:03 DrMartinus

This issue vaguely reminds me of: https://github.com/borgbase/vorta/issues/2199 In #2199 the user could not start Vorta after upgrading. Investigation showed that the update of the database was not complete, i.e. some of the required updates to the sqlite settings database have NOT been completed.
It seems that here in your logs we see a possible source for #2199: File "/usr/lib/python3.13/site-packages/vorta/store/migrations.py", line 243, in run_migrations _apply_schema_update( The db_schema could not be updated.

goebbe avatar Mar 21 '25 10:03 goebbe

I just googled for the IntegretyError (of the first post): peewee.IntegrityError: NOT NULL constraint failed: repomodel__tmp.create_backup_cmd

Apparently, the field "repomodel__tmp.create_backup_cmd" exists in the database - but contains no value. This is the reason for the error.

goebbe avatar Mar 21 '25 16:03 goebbe

It looks like Vorta isn't starting because of a database issue where a required field (create_backup_cmd) is missing. First, back up your database with cp ~/.config/Vorta/databases/vorta.db ~/.config/Vorta/databases/vorta_backup.db .

Then, open the database using sqlite3 ~/.config/Vorta/databases/vorta.db and check for issues with PRAGMA table_info(repomodel); .

If the field is missing or empty, fix it with UPDATE repomodel SET create_backup_cmd='' WHERE create_backup_cmd IS NULL; and exit with .exit .

Try running Vorta again with vorta. If it still fails, reinstall it using sudo pacman -R vorta && sudo pacman -Syu vorta , and check file permissions with chmod 600 ~/.config/Vorta/databases/vorta.db . If the issue persists, run it in debug mode using vorta --debug

CrazAr374 avatar Mar 25 '25 15:03 CrazAr374

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 24 '25 02:06 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jul 01 '25 02:07 github-actions[bot]