-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to IMMauss/Openvas from DeineAgenturUG/gvm #211
Comments
No offense taken ... Happy to see you moving over in fact. You "should" be able to do a DB restoral. Should being the optimal word here. I know this will get the majority of it. However, there "may" be some bits that are stored outside of the DB. In my implementation, I've done my best to make sure all of those bits are stored on the volume if you chose to use an external volume making the backup restore pretty easy. There is a procedure for restoring from an external DB in the docs that should get you though that part of it. You might need to piece meal the rest if there is something outside the DB from the old install that you need. Happy to help you through. Please feel free to post any additional questions here, and I'll do my best to help you get there. the most import thing though. BACKUP BACKUP BACKUP !! Don't trust anything until you have proven it and make sure you have multiple copies of the original before you start anything. And please let me know how it goes. It would be great to add a section to the docs on migrating from the old to new. -Scott |
Many thanks for your reply Scott. I will attempt to backup and restore the db and document what I do and share it here if I can get it done. Thank you.
|
Hi Scott, I have spent the whole day testing and trying to get everything in working order and do backup before attempting to restore the db from my DeineAgenturUG/gvm image. 2 questions I have:
Q2 is a feature similar to what Securecompliance and DeineAgenturUG had. I thought I recalled seeing a scanner image for yours but I might have been mistaken, can't find it now. Many thanks for your patience and assistance and for your work on this. best regards, |
Hi, Reporting back on migrating from the DAUG/gvm to IMMauss/Openvas. Turns out to be simpler than expected. DAUG/gvm uses a separate volume for the psql db which can be eg: /storage/database. Turns out if you move that entire database directory to /var/lib/docker/volumes/openvas/_data/database and change the ownership as necessary (see the user:group of the original database directory) then restart the container, gvmd picks everything up, though it takes some time to migrate the database. Previous reports, overrides, notes, users, etc are all there and speed of new scans is just like the DAUG/gvm container. Everything works a treat EXCEPT I can't get the mail working. Pretty sure its a firewall thing that I'm not seeing, so I need to work that out. Other than that I need to add scanners which I don't see an image for. Do I need to redeploy the whole openvas container on different machines and add them? I encountered these "errors" but they don't seem to affect the operations. :
I'm thinking that these errors are because I didn;t do a dump and restore, but as they don't affect operations, I'm inclined to leave it as it is. Thank you! best regards, |
Mark,
As for those errors, if they continue on future startups, let me know via seperate issue so we can track them down. I've put a lot of time into making sure DB version upgrades go smoothly, if I've missed something, I want to track it down. |
I'm going to try to create a new volume for the databases with
and see if that also works. I think it should. I noticed some issues with the ssl certs as well, but I want to confirm with a fresh try.
|
Thank you Scott!
I see, let me also try to play around with it and see if I can cobble something together.
Will do, I'm pretty sure these errors happen because I didn't do the dump then restore, but I will confirm. Thank you again! |
@markdesilva Is all well? Any more issues with the upgrade? |
Hi Scott, Been testing it for the last week(?) all seems good! I did two set of scheduled scans end of last week, doing one today and another on Monday. I am actually writing a sort of "guide" for the upgrade. Will post here for you to review and see if you want to add it to your documentation. Thank you once again! |
Here are the steps I took to migrate from DeineAgenturUG/gvm to IMMauss/openvas, but first a shoutout to @DeineAgenturUG as well for his work on his image and also for helping many of us before. I will refer to DeineAgenturUG/gvm as "dauggvm" and IMMauss/openvas as "immovas" for ease of reference. For dauggvm, the database is kept in a separate volume as defined by the user. In my case, it was kept in /storage/database. In immovas, the database is kept in the container volume /var/lib/docker/volumes/openvas/_data/database
You should see something like this:
The permissions in the host will be different from when in the container, but you need to make sure they are the same for the database you are migrating over.
You will now have the dauggvm database, but the ownership might be wrong, so you need to change it to what the immovas database ownership was in step (4), in this case it was owner "_apt", group "kvm". You need to do this for the database folder and all the files in it, so use the recursive argument.
You can log into the portal as normal and check that all your past scan reports, notes, overrides, targets, etc are all there.
which will have the correct ownership as determined in step (4) and set in step (7)
eg:
In this way the databases are separated always and you can do updates/upgrades to the image without worrying about affecting your database or running out of space as your database grows. I hope this makes sense and helps! Cheers! |
@immauss hope you don't mind, I modified the image /scripts/single.sh and added the following:
This is so I can have a separate volume for my ssl certs for easier maintenance and add them from the docker command with the following:
I am also looking at separating the feeds, so that updating the image or changing it won't require pulling all the feeds again. Eventually I should have separate volumes for
I think this makes management and future maintenance easier. Thank you! |
Mark, Thanks, |
I haven't forgotten this .. just hella busy the last moth or so. |
Hi,
Might not be the best topic for discussion, but some of us have come from using https://github.com/DeineAgenturUG/greenbone-gvm-openvas-for-docker/ image and I was wondering if there was a way to retain our old reports, notes, overrides and customization without having to start everything from scratch.
My apologies if my question has offended.
Thank you.
Regards,
Mark
The text was updated successfully, but these errors were encountered: