Ok I found another path that worked successfully for me.
For anyone who needs the information:

- took my original openvas8 sqlite database which was version 146.
- I did NOT migrate this sqlite database with openvasmd to get it to 184 as 
previously done
- Running the openvas-migrate-to-postgres script told me that now I was off by 
1 table instead of 5 or so
- It was missing "auth_cache" which seems not important to me to migrate so I 
adjusted the openvas-migrate-to-postgres script to skip the whole addition of 
this table; the table gets created in postgres anyway by the script.

"""
--- openvas-migrate-to-postgres 2017-05-09 19:14:26.000000000 +0200
+++ openvas-migrate-to-postgres_thijss  2017-05-10 11:20:02.297003082 +0200
@@ -1291,7 +1291,7 @@
         creation_time integer);"
 }

-TABLES_146="$TABLES_145 auth_cache"
+TABLES_146="$TABLES_145"

 migrate_146_to_147 () {
   pg "ALTER TABLE report_counts ADD COLUMN min_qod INTEGER;"
"""

After the import I additional ran " ./openvasmd --migrate " to make sure my 
postgres was up to date and surely it went Migrating from 147 to 184 again.
I can now login and see all my tasks and reports etc'.


Thijs Stuurman
Security Operations Center | KPN Internedservices
[email protected] | [email protected]
T: +31(0)299476185 | M: +31(0)624366778
PGP Key-ID: 0x16ADC048 (https://pgp.surfnet.nl/)
Fingerprint: 2EDB 9B42 D6E8 7D4B 6E02 8BE5 6D46 8007 16AD C048

W: https://www.internedservices.nl | L: http://nl.linkedin.com/in/thijsstuurman



-----Oorspronkelijk bericht-----
Van: Openvas-discuss [mailto:[email protected]] 
Namens Thijs Stuurman
Verzonden: woensdag 10 mei 2017 10:29
Aan: [email protected]
Onderwerp: [Openvas-discuss] Openvas9 sqlite to postgresql

OpenVAS-Discuss,

I am attempting an upgrade from OpenVAS 8 to 9 and sqlite to postgres.
It seems I successfully upgraded my openvas8 sqlite database with the openvas9 
openvasmd --migrate:

"""
md   main:   INFO:2017-05-10 08h20.47 utc:27669:    Migrating database.
md   main:   INFO:2017-05-10 08h20.47 utc:27669:    Migrating to 147
...
md   main:   INFO:2017-05-10 08h20.50 utc:27669:    Migrating to 184
"""

Yet I cannot migrate to postgres (using a freshly created empty tasks database) 
it ends at:

"""
<31>May 10 10:21:13 openvas-migrate-to-postgres: resources_predefined nvts 
tasks reports
11d10
< auth_cache
26,30d24
< host_details
< host_identifiers
< host_max_severities
< host_oss
< hosts
36d29
< oss
<29>May 10 10:21:13 openvas-migrate-to-postgres: Internal Error: tables being 
copied do not match tables in SQLite db """

Any tips?


Thijs Stuurman
Security Operations Center | KPN Internedservices 
[email protected] | [email protected]
T: +31(0)299476185 | M: +31(0)624366778
PGP Key-ID: 0x16ADC048 (https://pgp.surfnet.nl/)
Fingerprint: 2EDB 9B42 D6E8 7D4B 6E02 8BE5 6D46 8007 16AD C048

W: https://www.internedservices.nl | L: http://nl.linkedin.com/in/thijsstuurman


_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss
_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to