PostgreSQL Migration Greenbone on Ubutu 22.4.2 → to Docker 25.1.1 (Docker or Kali?)

Hello,

I’m actually on Openvas install on ubuntu VM at version 22.4.2, and I want to migrate on docker version 25.1.1.

I want to migrate my PostgreSQL database for Greenbone from version 22.4.2 to 25.1.1. I’m hesitating between using Docker or the native installation on Kali Linux.

  • Which method is the easiest to implement?
  • Are there specific steps to follow to avoid data loss?

I haven’t found any written documentation about previous docker-compose configurations for GVMD versions 23 and 24, even though the images exist in your repositories. I’m also wondering if there are mandatory compatible versions between services.

When I tried simply changing the GVMD version, I encountered errors like this:

md manage:WARNING:2025-03-12 09h20.43 utc:44: osp_scanner_feed_version: failed to connect to /var/run/ospd/ospd.sock

Thanks in advance for your advice !

I opted for the installation of GVMD on Ubuntu images.

I was able to migrate the data, and I can see it correctly in my containerized environment. After changing the scanner to use the , I launched a scan, but it got stuck around 11%.ospd-openvas.sock

Here are the logs:


Container /openvas_ospd-openvas_1 Logs:

  • OSPD[7] 2025-03-24 16:58:27,736: INFO: (ospd.main) Starting OSPd OpenVAS version 22.8.1.
  • OSPD[7] 2025-03-24 16:58:37,810: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait…
  • OSPD[7] 2025-03-24 16:59:50,602: INFO: (ospd_openvas.daemon) Finished loading VTs. The VT cache has been updated from version 0 to 202503240642.
  • OSPD[7] 2025-03-24 17:05:16,451: INFO: (ospd.command.command) Scan a9ffa71b-9194-4ecb-a77f-eb1100f9958b added to the queue in position 2.
  • OSPD[7] 2025-03-24 17:05:16,578: INFO: (ospd.ospd) Currently 1 queued scans.
  • OSPD[7] 2025-03-24 17:05:16,753: INFO: (ospd.ospd) Starting scan a9ffa71b-9194-4ecb-a77f-eb1100f9958b.

Container /openvas_openvasd_1 Logs:

  • 2025-03-24T16:58:26.363412Z INFO openvasd: Configuring storage devices mode=ServiceNotus storage_type=InMemory
  • 2025-03-24T16:58:26.363432Z INFO openvasd: Using in-memory storage. No sensitive data will be stored on disk.
  • 2025-03-24T16:58:26.371365Z WARN openvasd: enable_get_scans=false
  • 2025-03-24T16:58:26.371402Z INFO openvasd::controller: running in config.mode=ServiceNotus
  • 2025-03-24T16:58:26.371429Z INFO openvasd::controller: listening on http://0.0.0.0:80

Container /openvas_gsa_1 Logs:

  • starting gsad
  • gsad main-Message: 16:58:06.302: Starting GSAD version 24.2.2
  • gsad gmp-Message: 16:58:55.329: Authentication success for ‘admin’ from 10.250.0.148

Container /openvas_gvmd_1 Logs:

  • md manage: INFO:2025-03-24 16h59.35 utc:108: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
  • event task-Message: 17:05:00.828: Status of task DMZ-OUT (53f7b84e-f1c7-45b3-8083-47ef01c70fec) has changed to Requested

Container /openvas_openvas_1 Logs:

  • sd main: DEBUG:2025-03-24 17h25.42 utc:2917:a9ffa71b-9194-4ecb-a77f-eb1100f9958b: pre_fn_call: called
  • libgvm util: DEBUG:2025-03-24 17h25.42 utc:2917:a9ffa71b-9194-4ecb-a77f-eb1100f9958b: mqtt_reset: start
  • sd main: DEBUG:2025-03-24 17h25.42 utc:2917:a9ffa71b-9194-4ecb-a77f-eb1100f9958b: pre_fn_call: exit
    libgvm util: DEBUG:2025-03-24 19h19.14 utc:503:6c64e53e-1dea-45dc-8ecf-0d4882099ca2: redis_delete_all: deleting all elements from KB #9

Container /openvas_redis-server_1 Logs:

  • 7:C 24 Mar 2025 16:57:26.167 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=7, just started
  • 7:M 24 Mar 2025 16:57:26.169 * Running mode=standalone, port=0.

Container /openvas_pg-gvm_1 Logs:

  • 2025-03-24 16:57:25.787 UTC [24] LOG: redo done at 9/45E772E8
  • 2025-03-24 16:57:56.842 UTC [100] LOG: starting PostgreSQL 13.20 (Debian 13.20-0+deb11u1)
  • 2025-03-24 16:58:08.510 UTC [111] gvmd@gvmd WARNING: there is already a transaction in progress
  • 2025-03-24 16:58:09.078 UTC [111] gvmd@gvmd WARNING: there is no transaction in progress

I’ve been waiting for about two hours now. Resource consumption is very low, and I’m unsure if there’s anything I should do next.

I don’t see anything alarming in the logs at first glance.

1 Like