immauss / openvas

Containers for running the Greenbone Vulnerability Manager. Run as a single container with all services or separate single applications containers via docker-compose.
GNU Affero General Public License v3.0
366 stars 102 forks source link

Upgrading from v22 to v24 #298

Closed markdesilva closed 2 months ago

markdesilva commented 2 months ago

Hi there, been away for too long.

Just noted my scan engines are outdated. Can I just pull the new version and it migrates my dbs or I have to export and import all over again?

Any news on the separation of SSL certs, feeds and databases as I mentioned I was working on here https://github.com/immauss/openvas/issues/211#issuecomment-1675969997 ?

Thank you!

immauss commented 2 months ago

Man ... I've had your thread on my todo list for a while ....

I have implemented some bits to reduce time for feed updates. Not a separate volume, but the startup checks the age of existing feeds (assuming you are starting with a previously used volume attached) and updates the feeds from the latest on the image, which should be less than a week old.

Now ... you "Should" be able to just update the image and go. Database migration should be handled smoothly.

However, if you haven't updated in a year, then YMMV . . . .

PLEASE PLEASE PLEASE make a backup of your data volume before trying just in case something goes wrong. If it does go wrong, please let me know. I've not done any testing with a migration from that far back. . . .

If it does work out, please let me know too. :)

Thanks, Scott

immauss commented 2 months ago

Oh ... and I think adding GSAD_ARGS=${GSAD_ARGS:-blank} was inspired by your post .... -Scott

immauss commented 2 months ago

Close too early ... That should allow you do what you wanted to do with the certs without rebuilding the image

-Scott

markdesilva commented 2 months ago

Thanks Scott! Will backup and pull the latest and then play around with it and let you know how it goes.

Cheers!

markdesilva commented 2 months ago

Stopped and removed the old container (my dbs are separated so no issues). Did some clean up with prune and pulled the latest. Started it up and the logs said "Migrate databases if necessary" and stayed that way for about 20 mins, after that everything started up as normal. All my scans, reports, etc all intact!

Only issue I have now, is the new branding completely messes up my phone screen. Anyway for me to go back to the old branding login page at least until I can upgrade my phone to something bigger? If not it's ok, I guess I can live with it. Just have to incessantly scroll to log in.

Btw, saw your interviews on YouTube from last year, interesting stuff man! That call back to how you fixed a colleague's laptop and suddenly got labelled the IT guru and you just ran with it - brought a smile to my face!

Cheers!

immauss commented 2 months ago

Thanks!

Glad it worked well.

And ... which interview ? There are a few out there now. But yeah ... and it was actually in the days before everyone had a laptop, so it was just her home computer....... One of the best decisions I've ever made.

I'll have to look for a way to make the login a little more phone friendly. Wasn't something I had even considered during dev.

Thanks, Scott

markdesilva commented 2 months ago

And ... which interview ? There are a few out there now. But yeah ... and it was actually in the days before everyone had a laptop, so it was just her home computer....... One of the best decisions I've ever made.

It was the virtual ciso one and the infosec wrap up.

I'll have to look for a way to make the login a little more phone friendly. Wasn't something I had even considered during dev.

I use this to cater for the mobile devices when I do my dev, light weight - https://mobiledetect.net/

markdesilva commented 2 months ago

Stopped and removed the old container (my dbs are separated so no issues). Did some clean up with prune and pulled the latest. Started it up and the logs said "Migrate databases if necessary" and stayed that way for about 20 mins, after that everything started up as normal. All my scans, reports, etc all intact!

Just realized from the logs that after the db migrated the container crashed with the error:

chgrp: cannot dereference '/var/run/ospd/ospd.sock': No such file or directory

But the container restarted and it was fine after. (I have --restart always set).