I updated by Gitlab recently, but by backup file is in older version which will be incompatible for new version. So I want to rollback the Gitlab to previous version. How to do that?
The GitLab upgrade process is supposed to upgrade the database (and the other files should be compatible).
But anyway, if you want to downgrade, try from a fresh installation of the older GitLab, and add your files in it, reimport your database backup.
See "Restoring from backup after a failed upgrade " (based on older GitLab archives, and your database backup) for the full process.
Related
Regarding Omnibus GitLab version downgrade from 12.7.5 to 12.6.2. Have followed the below steps.
Have taken the backup from 12.7.5 version.
Uninstalled the 12.7.5 version.
Installed 12.6.2 using rpm.
Tried to restore from backup file created from 12.7.5 tar file..
Message shows restore required same version(12.7.5).
I have gone the GitLab document. It says you can only restore a backup to exactly the same version was backup taken and type (CE/EE) of GitLab.
Can't find alternative method documents to roll back. So is there any way to downgrade?
Gitlab only supports downgrading when you have an backup of your data that was created using the version you want to downgrade to (in your case 12.6.2).
In case you have one, you can simply restore the backup using the instructions provided in the link.
I'm not aware of any alternative to downgrade in case you don't have one.
I was using git lab (9.5.4) and I took backup and reinstalled complete git lab with latest version. I was trying to restore the data from older version of backup but I am getting error as version mismatch and kindly switch to older version
I went through some of the Git lab doc but I didn't get useful stuff can somebody help me how can I restore the data from older version of git lab backup? Waiting for the reply. Thank you in advance.
Unfortunately GitLab doesn't support that option. You would need to mount a Gitlab with the same version as the one you have, recover the backup there and then update THAT Gitlab, that way you'll have an updated database that you can backup and restore on your installation.
My advice would be to use Docker for the old one (https://hub.docker.com/r/gitlab/gitlab-ce/)
Since Bitnami stopped Centos installer and started to support only ova, we are stuck with old version, Looking for document which talks about migrating Bitnami Gitlab to Latest Gitlab CE omnibus. We use external dbs.
In this link you can find the process a user followed to upgrade Gitlab from non-omnibus to omnibus: https://community.bitnami.com/t/migration-of-data-and-upgrading-from-bitnami-gitlab-7-10-1-to-latest-gitlab-enterprise-version/46741/12?u=jsalmeron
From the GitLab backup/restore docs:
You can only restore a backup to exactly the same version and type (CE/EE) of GitLab on which it was created. The best way to migrate your repositories from one server to another is through backup restore.
Here's what I would do:
Create a full backup of the old GitLab instance using the rake task
Install a new instance of GitLab 8.9.6 in your new server (using Omnibus distro package)
Restore the backup to your new server
Slowly upgrade your new server to the latest version
I would only skip about 2-4 minor versions at a time, and recommend going back through and reading the release notes of each version.
E.g. yum install gitlab-ce-9.1.0
I'm attempting to migrate from a GitLab 7.1.0 (Source) installation (on Centos6) to latest omnibus (on Centos7) using these instructions:
https://docs.gitlab.com/omnibus/update/README.html#upgrading-from-non-omnibus-postgresql-to-an-omnibus-installation-using-a-backup
Essentially it boils down to:
Set up a new machine,
Install the omnibus version on the new machine that matches your source version,
Do an "backup" from the source version,
Restore that backup into the omnibus version,
update the omnibus version to latest.
I'm stuck on #2. I've added the GitLab repo, but the oldest version of the "gitlab-ce" package available is 7.10.0. Also they're named weirdly, e.g. "7.10.0~omnibus-1", "7.10.0~omnibus.1-1", etc. instead of simply "7.13.0-ce.0.el7".
What are my options? If I install 7.13.0 Omnibus from the repo then try to restore a backup from 7.1.0 into it, should I expect that to work? Will I lose data?
Is there a 7.1.0 omnibus RPM available somewhere?
If the new machine needs to be Centos6 in order to install a 7.1.0 omnibus package then I can reimage.
If you look in the official RPM repo it looks like 7.10 is the oldest version of the omnibus available for CentOS.
I think your best option is to perform the source upgrade outlined in 6.x-or-7.x-to-7.14.md which should let you upgrade to v7.14. Then you can resume the normal "upgrade source installation to omnibus installation" method you found.
Also, in case it's helpful, the docs repo has incremental source upgrade procedures for many more versions.
When upgrading my very old version of gitlab(4.0.1) to 6.0, after running the rails migrate script, the gitlabhq_production database just gets wiped out, leaving only tables, but no data in them. The command I am using is:
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
I thought of checking out the upgrade scripts from every major revision and running them, but I figured this would be handled directly in the most recent script. Before running the above script, I also made sure I created a git user(both in db and on the OS), and reassigned table ownership to the git user.
Does anyone have any tips on how this could be solved?
It is best to:
restore your database (assuming you did a backup before attempting the migration)
follow the migration guides from 4.2 to 5.0, and then from 5.0 to 5.X, then 6.0
The most recent scripts will be able to automate the upgrade process only from 6.x to 6.y.