Migrate GVM-11 to GVM 20.08

Hi,
I’m running GVM-11 and I would like to know what is the best way to migrate the GVM-11 version to the new GVM-20.08. Is it possible to update or eventually install the new version while keeping the existing configuration?
Can you tell me if there is any documentation about it?

Thank you!

GVM-11 versions

gsad: (‘Greenbone Security Assistant 9.0.1’)
gvmd: (‘Greenbone Vulnerability Manager 9.0.1’)
openvas-scanner: (‘OpenVAS 7.0.1’)
gvm-libs: gvm-libs 11.0.1

Environment

Operating system: CentOS 8
Kernel: (‘Linux openvas2 4.18.0-240.10.1.el8_3.x86_64 #1 SMP Mon Jan 18 17:05:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux’)
Installation method / source: FETCH GVM-11 (stable) PACKAGES

I’m on the same boat.
The only difference is I’m running on Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-42-generic x86_64)

1 Like

Hi,

I can’t speak for packages you are getting from a distribution. With a source build you need to stop all services, build all components and install all components. You need to add the pgcrypto postgres extension (https://github.com/greenbone/gvmd/blob/gvmd-20.08/INSTALL.md#setting-up-the-postgresql-database) and to run gvmd --migrate to update the database to the current schema.

Because we moved report formats, port lists and scan configs to be shipped with the feed you need to set a Feed Import Owner (https://github.com/greenbone/gvmd/blob/gvmd-20.08/INSTALL.md#set-the-feed-import-owner). Afterwards you need sync the feed to get certs, scap, nvts and the new parts (report formats, port lists, scan configs). After restarting the services GVM should be up and running.

For more details and hints please take a look at GVM 20.08 (stable, initial release 2020-08-12)
Specific errors and problems may occur due to your personal setup or configuration chosen by the distribution packagers.

One big topic is for example a PostgreSQL update. This hasn’t really something to do with GVM but how the new PostgresSQL version is installed, updated and configured and may lead to several problems.

1 Like

Btw. in the past we always supported at least an update from the last release to the current release. In this case from GVM 11 to 20.08.

2 Likes

Hi bricks,
thank you for your suggestion, it seems easy but i’m sure something will go wrong, however i will try to follow the operations you described and see what happens.
I’ll let you know as soon as possible.

I was recently able to do this. First I set up a new VM on Ubuntu 20.04 (I was running gvm-11 on 18.04 and I just thought it best to set up on a new VM). I followed this guide to do so: https://www.mikeslab.net/install-greenbone-vulnerability-manager-20-08-on-ubuntu-20-04/

This gave me a brand new blank gvm-20.08 installation. But in order to get all my tasks and stuff back from gvm-11 I had to dump and then restore my postgresql database. I found out some steps to do so over on the bottom of https://github.com/vulnbe/greenbone-source-edition-overlay

also setting the feed import owner config was definitely important in order to get my reports working.

2 Likes

Hi,
I downloaded and recompiled all the new components of GVM-20, or rather almost all, in fact I was unable to recompile GVMD. At the moment everything works perfectly but I am still using GVM version 9.
The scans and all data in the database are working fine and are taking advantage of the new GVM-libs 20.8.1 including the GSA, however compiling the GVMD-20.8.1 package returns errors.
I tried to compile gvmd-20 using the previous guide for CentOS 8 and GVM-9 posted in this section of the forum but it doesn’t work.
Has anyone tried this before? Do you have any advice?
Thank you!

Getting the guide I was referring to suggested editing the CMakeList file as follows before proceeding to build:

[root@~]# vi /opt/gvm/src/gvmd-9.0.1/CMakeLists.txt

change this:

set (CMAKE_C_FLAGS “${CMAKE_C_FLAGS} -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64”)

to this:

set (CMAKE_C_FLAGS “${CMAKE_C_FLAGS} -Wall -lpq -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64”)

Is this still valid for GVMD-20.8 version?

CMake command is still correct?
$ cmake … -DCMAKE_INSTALL_PREFIX=/opt/gvm/ -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/pgsql/server -DPostgreSQL_INCLUDE_DIR=/usr/include/pgsql/server -DPostgreSQL_LIBRARY=/usr/lib64/pgsql