Simple server migration

Hi,

I have one server with only GitLab installed and I would like to migrate it into a new server.

Is it enough If I do an backup restore of the /etc/gitlab folder and of the GitLab instance by using commands like it’s explained in the documentation?
Does all GitLab (+Container repository +Mattermost +CI) datas and configurations will be migrated?

Thanks

Except for Mattermost, that should be all you need to do: follow the backup directions on the old machine and then the restore directions on the new machine. I did this successfully to move one of my servers last year.

For Mattermost, you need to back up and restore separately, I think. I have not tried doing this myself yet, so I don’t know how well it works. See https://docs.mattermost.com/administration/migrating.html

1 Like

Thanks @kohenkatz,

Mattermost is not the most important.

But I think I just have to dump and restore database. The mattermost configuration is generated from /etc/gitlab/gitlab.rb, so I guess it’s not necessary to migrate config.json.

I confirm that gitlab-rake gitlab:backup:create doesn’t dump the mattermost database.
I did this commands to dump and restore database.

On old server:

su - gitlab-psql
pg_dump --host=/var/opt/gitlab/postgresql mattermost_production| gzip -c > /tmp/mattermost_production.sql.gz

On new server:

cd /tmp
gunzip mattermost_production.sql.gz
gitlab-psql -d mattermost_production -f /tmp/mattermost_production.sql

I did some tests and my migration look done with success :slight_smile:

Hi,
I followed steps from here to migrate GitLab to AWS Server (EC2 instance)