Migrating single Gerrit projects from a Gerrit 2.7 server to a new Gerrit 2.12 Server

49 views
Skip to first unread message

Sarah Elkins

unread,
Sep 30, 2016, 11:15:46 PM9/30/16
to Repo and Gerrit Discussion
Hi Everyone, 

Please bear with me, I am new to Gerrit and have some migration questions.  

We have several projects that are currently in a Gerrit 2.7 server and would like a way of migrating them on a per project basis to a new instance of Gerrit 2.12.  Is there a way to do this without having to do a full dump of the Gerrit databases, importing the databases to the new server and then do clean up? 

I see that there is a import tool for Gerrit 2.12 that may allow this.  However, we may not have an option to upgrade the Gerrit 2.7 instance to allow this tool to work correctly.  

Any help would be greatly appreciated.  

Thank you in advance.  

Edwin Kempin

unread,
Oct 1, 2016, 12:26:06 AM10/1/16
to Sarah Elkins, Repo and Gerrit Discussion

The importer plugin really only works with recent Gerrit versions (from 2.11?). With 2.7 you can only migrate projects manually with export/import of the database content. I would advise to migrate projects from the 2.7 instance to a new 2.7 instance and then upgrade the new instance to 2.12 only after the projects have been migrated. Otherwise you would need to worry about schema migration during the project migration.

 
>
> Thank you in advance.  
>
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Edwin Kempin
Software Engineer
eke...@google.com
+16502534437

Google Germany GmbH
Dienerstraße 12
80331 München

Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.

Sarah Elkins

unread,
Oct 3, 2016, 10:19:29 AM10/3/16
to Repo and Gerrit Discussion, selk...@gmail.com
Hi Edwin, 

Thank you so much for this confirmation. I do have another question though.  To try and evaluate the effort involved in upgrading, we would like to determine how many users/projects are actually using Gerrit Code review in this instance.  Our current instance is utilizing PostgreSQL for the databases.  Is there a query we can use to find the projects that are utilizing the instance for reviews and custom permissions? 

Saša Živkov

unread,
Oct 5, 2016, 8:58:24 AM10/5/16
to Sarah Elkins, Repo and Gerrit Discussion
On Mon, Oct 3, 2016 at 4:19 PM, Sarah Elkins <selk...@gmail.com> wrote:
Hi Edwin, 

Thank you so much for this confirmation. I do have another question though.  To try and evaluate the effort involved in upgrading, we would like to determine how many users/projects are actually using Gerrit Code review in this instance.  Our current instance is utilizing PostgreSQL for the databases.  Is there a query we can use to find the projects that are utilizing the instance for reviews

You can query the "changes" table. Something like:

  select count(*), dest_project_name from changes group by 2 order by 1;

Adding a condition on the last_updated_on may make sense to only find projects active in the last N days, months, etc...


and custom permissions? 

Not from database.

...

Another way is to look inside the $GERRIT/logs/httpd_log and $GERRIT/logs/sshd_log
and find which projects are actively using Gerrit.
 

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages