When running GVM with SQLite and trying to migrate and older database via gvmd --migrate
the following errors might show up in your gvmd.log:
md main:MESSAGE:2019-08-13 07h52.53 utc:16607: Greenbone Vulnerability Manager version 8.0.1 (DB revision 205)
md main: INFO:2019-08-13 07h52.53 utc:16607: Migrating database.
md main: INFO:2019-08-13 07h52.53 utc:16607: Migrating to 189
md manage:WARNING:2019-08-13 07h52.53 utc:16607: sql_exec_internal: sqlite3_step failed: error in view result_overrides: no such table: main.results
md manage:WARNING:2019-08-13 07h52.53 utc:16607: sqlv: sql_exec_internal failed
md manage:WARNING:2019-08-13 08h00.59 utc:17249: sql_exec_internal: sqlite3_step failed: error in view results_autofp: no such table: main.results
md manage:WARNING:2019-08-13 08h00.59 utc:17249: sqlv: sql_exec_internal failed
To continue with the migration please run the following commands (replace $prefix
by your installation path):
sqlite3 $prefix/var/lib/gvm/gvmd/gvmd.db "DROP VIEW IF EXISTS result_overrides;"
sqlite3 $prefix/var/lib/gvm/gvmd/gvmd.db "DROP VIEW IF EXISTS results_autofp;"
Afterwards you can re-run gvmd --migrate
and the migration should be successful.
Note: No data will be lost as the views are re-created after the next GVMd start.
Note: SQLite will be dropped with the next major release GVM-11. It is strongly recommended to plan a migration to the PostgreSQL backend.