Hints for migration to GVM 10

Dear packagers and users of the Greenbone Source Edition,

before updating your sources and packages from GVM/OpenVAS 9 to our latest GVM 10 release, please take a look at the necessary changes for a successful data migration:

The name and location for the openvas-scanner log file has changed too:

Furthermore the kb_location configuration option of the openvassd.conf has been renamed to db_address. Make sure to update the openvassd.conf accordingly when using such a file.

3 Likes

A post was split to a new topic: How to migrate from GVM-9 to GVM-10?

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.