migration of gerrit data to a new docker container

227 views
Skip to first unread message

zhuoran Zhang

unread,
Aug 18, 2022, 11:36:47 AM8/18/22
to Repo and Gerrit Discussion
Hi, 
I have created a Gerrit3.6.1 using docker, Now I want to migrate the existing data to a new docker. How can I achieve this

Martin Fick

unread,
Aug 19, 2022, 9:56:31 AM8/19/22
to zhuoran Zhang, Repo and Gerrit Discussion
On 8/17/22 9:25 PM, zhuoran Zhang wrote:
> I have created a Gerrit3.6.1 using docker, Now I want to migrate the
> existing data to a new docker. How can I achieve this

I don't quite understand what you are asking how to do, can you elaborate?

-Martin

Mikko Paukkila

unread,
Aug 23, 2022, 4:34:28 AM8/23/22
to Repo and Gerrit Discussion
Which Gerrit version you had before? Migration steps might depend on the version upgrade path.

Are Gerrit's data folders stored inside the container or on volume on the host machine? If you had those inside the container then you need to copy the folders out. Docker volume mounts are more recommended.

I use the attached Docker Compose file for Gerrit start. Volume mounts are listed there. No need to touch the volumes between upgrades. But it is better to backup those before upgrade. Depending on your upgrade path (from which version you upgrade), you might need to start new Gerrit instance so that it first time reindexes etc. Go through Gerrit release notes to see what steps are needed. Just add the right command one by one and run 'docker-compose up', remove the command and make a real launch 'docker-compose up -d'. 

Br. Mikko
docker-compose.yml
Reply all
Reply to author
Forward
0 new messages