Thanks Luca.
I just read that v3.3 downgrade guide and used these commands:
1. Stop Gerrit 3.7.0 service.
2. For All-Projects.git: git update-ref refs/meta/version $(echo -n 184|git hash-object --stdin)
3. For All-Users.git: git update-ref HEAD HEAD
4. java -jar gerrit-3.6.3.war init -d site
5. java -jar gerrit-3.6.3.war reindex -d site
Then I get these during reindex:
[2022-11-21 19:24:47,720] [main] INFO com.google.gerrit.server.rules.PrologEnvironment : reductionLimit: 100000, compileLimit: 1000000 [12/1973]
Exception in thread "main" com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) [Guice/ErrorInjectingConstructor]: IndexFormatTooNewException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/srv/gerrit/s
ite/index/changes_0077/open/segments_23q"))): 9 (needs to be between 4 and 6)
at LuceneChangeIndex.<init>(LuceneChangeIndex.java:156)
while locating ChangeIndex annotated with @UniqueAnnotations$Internal(value=3)
Learn more:
https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR1 error
======================
Full classname legend:
======================
ChangeIndex: "com.google.gerrit.server.index.change.ChangeIndex"
IndexFormatTooNewException: "org.apache.lucene.index.IndexFormatTooNewException"
LuceneChangeIndex: "com.google.gerrit.lucene.LuceneChangeIndex"
UniqueAnnotations$Internal: "com.google.inject.internal.UniqueAnnotations$Internal"
========================
End of classname legend:
========================
at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1103)
at com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:878)
at com.sun.proxy.$Proxy31.create(Unknown Source)
at com.google.gerrit.server.index.SingleVersionModule$SingleVersionListener.start(SingleVersionModule.java:98)
at com.google.gerrit.server.index.SingleVersionModule$SingleVersionListener.start(SingleVersionModule.java:79)
at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:95)
at com.google.gerrit.pgm.Reindex.run(Reindex.java:119)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:224)
at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:120)
at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:65)
at Main.main(Main.java:29)
Caused by: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/srv/gerrit/site
/index/changes_0077/open/segments_23q"))): 9 (needs to be between 4 and 6)
at org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:216)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:304)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:288)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:930)
at com.google.gerrit.lucene.AutoCommitWriter.<init>(AutoCommitWriter.java:35)
at com.google.gerrit.lucene.AutoCommitWriter.<init>(AutoCommitWriter.java:31)
at com.google.gerrit.lucene.AbstractLuceneIndex.<init>(AbstractLuceneIndex.java:134)
at com.google.gerrit.lucene.ChangeSubIndex.<init>(ChangeSubIndex.java:80)
at com.google.gerrit.lucene.ChangeSubIndex.<init>(ChangeSubIndex.java:59)
at com.google.gerrit.lucene.LuceneChangeIndex.<init>(LuceneChangeIndex.java:198)
at com.google.gerrit.lucene.LuceneChangeIndex$$FastClassByGuice$$204094046.GUICE$TRAMPOLINE(<generated>)
at com.google.gerrit.lucene.LuceneChangeIndex$$FastClassByGuice$$204094046.apply(<generated>)
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1100)
... 15 more
Not sure in which step I've made a mistake...