Moving a DB from machine to other machine

migration

#1

Hello,
How to move the DB include the results from a machine running openvas to another freshly installed machine?
Thank you


#2

Hi, when choosing the category for a topic please try to have a look at the category description for each category first:

The current used category is/was https://community.greenbone.net/c/gos (Description: About the Greenbone OS (GOS) category) which is about the Operating System “Greenbone OS” of the Greenbone Security Manager (GSM) or the Greenbone Community Edition (GCE, About the Community Edition (GCE) category).

Based on your questions it seems you’re running an own installation of OpenVAS/GVM where the https://community.greenbone.net/c/gse (Description: About the Source Edition (GSE) category) is fitting.

I have moved the topic to the correct category for now.


#3

If you are using sqlite3 as the db backend you can copy the task.db file to the new machine. Where to find and put the db depends on your installation method.


#4

Hello,
Thank you for the reply,
I do not know what you mean with the using sqlite3!
The configuration of the openvas was build on the default nothing been changed.
I copied the task.db to the new machine with the same settings created in the old one, but I keep getting an error message when using the copied database in the new machine, however, when I return the original database that created with the openvas it work without any errors.


#5

We (Greenbone) don’t supply any software to the users despite the GCE (community edition), GSE (source edition) or GSM (appliances). Therefore we aren’t responsible or even aware of your installation method and configuration. Currently you can choose between two database backends namely sqlite3 and postgres. We (Greenbone) are using postgres mostly but distributions are still taking sqlite3.

Would be good to get the exact error message.


#6

Hello,
This is the error message.


#7

Hi,

when moving a database (tasks.db for sqlite3) from one host to another please make sure that the OpenVAS Manager (openvasmd/gvmd) version on the target host (Hint: How to compare the current used versions of the OpenVAS/GVM packages with the GVM-9 stable release?) is at least on the same level like the original host.

e.g. you can migrate an manager 7.0.2 database to a version 7.0.2 or 7.0.3 but not a manager database from 7.0.3 to a host running version 7.0.2 of the manager without updating the manager version first.

It might be possible that you e.g. have migrated the database to a host running a higher version of the manager then previously used. In this case the manager won’t start and will log a note to its logfile (openvasmd.log/gvmd.log).

In this case you need to run the database upgrade routine like explained in the documents below:


#8

Thank you cfi,
Both systems running the same version 7.0.3 and same settings.
Am aware of this command whoever after executing this command and generate the db file, how to import it that file on the other system running openvas or how to make the other system running openvas detect that new generated db?