I was afraid to upgrade my 9.9.0 environment to 9.9.1 so I raised a 9.9.1 environment via Helm Chart parallel to this 9.9.0 environment, I thought about restoring my “projects” and “users” in this new environment and then remove the old environment, then ran a pg_dump of the 9.9.0 environment’s sonar_db and restored this dump to the 9.9.1 environment’s sonarDB, however to my surprise, my SonarQube POD stopped.
➜ k get pod
NAME READY STATUS RESTARTS AGE
sonarqube-postgresql-0 1/1 Running 0 45s
sonarqube-sonarqube-0 0/1 CrashLoopBackOff 29 (92s ago) 138m
I believe that in this case, it would be interesting to know which one to perform only the restore of the “projects” and “users” table for version 9.9.1 because I think that it may have changes in DB variables and tables, however, I also do not know how to do that in Postgres, for backup I only know pg_dump and pg_dumpall, which performs the backup of the entire DB.
Has anyone gone through a similar experience to help me? (attached the log file)
k logs -f sonarqube-sonarqube-0| grep ERROR
:19 ERROR web[o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘jdk.internal.loader.ClassLoaders$AppClassLoader@3c5a99da-org.sonar.server.platform.serverid.ServerIdManager’: Initialization of bean failed; nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)