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.
Related
Currently, I'm using Odoo 12 community version on my local system now I want to upgrade from Odoo 12.0 to Odoo 15.0 (CE).
I tried online but it's asking Enterprise subscription code.
When I tried with command as given below giving me following error.
python3.7 <(curl -s https://upgrade.odoo.com/upgrade) test -d -t 15.0
Unable to get the subscription code of your database.
Your database must be registered to be eligible for an upgrade.
Anyone, please help me, I would be very thankful.
Thank You
Follow the steps described in Running the migration.
For versions earlier than 14.0, you will need to run the OpenUpgrade fork rather than Odoo itself.
First, you will need to upgrade from 12 to 13
Or, for older versions: check out the OpenUpgrade source code from Github for the branches you need. Each branch migrates to its version from the previous version, so branch 13.0 migrates from 12.0 to 13.0. If you are migrating across multiple versions, you need to run each version of OpenUpgrade in order. Skipping versions is not supported.The OpenUpgrade repository includes both openupgrade_framework and openupgrade_scripts:https://github.com/OCA/openupgrade
Edit the configuration files and command line parameters to point to the database you are going to upgrade. The recommended command line parameters are the:
--update all --stop-after-init --load=base,web,openupgrade_framework flags.
For versions earlier than 14.0 that are running the OpenUpgrade fork rather than Odoo itself, you do not pass the load parameter.
Edit:
Check the OCA Days 2021 - Raúl Ortiz: Open Upgrade Discussion for more details.
Upgrade feature is available only for the Odoo Enterprise customers. You can try https://github.com/OCA/OpenUpgrade or convert your Odoo version to Enterprise
As Postgresql versions less than 9.5 are becoming unsupported I need to update this package in my Centos environment.
Current version: postgres -V (PostgreSQL) 9.2.24
Also in my ecosystem, there is another rpm that uses postgresql. For this rpm there are build, restart scripts and also various scripts that monitor dependency services, check status etc.
These scripts all reference postgresql using kwywork postgresql
https://www.postgresql.org/download/linux/redhat/ provided the exact steps how to do update/install. However for 9.6 version for example one need to use postgresql-9.6 keywords to refer to postgresql
This means one will need to go through all references of postgresql in scripts and code and analyze if it needs to be changed. Updating to another version afterwards would of course mean repeating this process.
Is there any 'out of the box' approach that allows us to leave the scripts untouched for this update?
I'm also copy/pasting the install postgresql 9.6 steps here.
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install postgresql96-devel postgresql96-server
/usr/pgsql-9.6/bin/postgresql96-setup initdb
systemctl enable postgresql-9.6
systemctl start postgresql-9.6
This is to check all is good
service postgresql-9.6 status
I don't know any "out of the box approach".
You should alyways read detailed release notes to check if there is some incompatibility when upgrading.
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 had some rpms which was build locally using rpm-build.I installed it on CentOS machine and later i removed and installed latest build ones. Now i am in a situation to get the previous installed rpm version. Is there any way to get the list of removed rpms??. I removed the previous rpms using "rpm -e" command.
Older versions stored a snapshot of the installed RPMs in /var/log/rpmpkgs - I don't remember what interval, but it's not built-in; it was a cron job. Newer distributions don't seem to do that any more, because yum logs everything natively, and the cron job was kind of a hack.
You don't say what version of CentOS, but if you don't have that log file, I think you're out of luck. You might get lucky and have it in somebody's shell history (root or a user who ran sudo).
Yesterday I've upgraded my Gitlab installation from 5.3 to 6.0 (technically from 5.3 to 5.4 and 5.4 to 6.0), and I can't display Network and other Graphs since then.
On the network page it seems some Javascript is not loaded, as I got a 'Network is not defined' error. Graphs seems to be a different issue, but I can't find anything in the logs.
Is it a bug or I did something wrong?
Both functions were working fine before the upgrade.
Try to precompile your assets:
sudo service gitlab stop
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
sudo service gitlab start
This seems to be a bug in GitLab. It breaks when it encounters a commit that doesn't change any files, such as when creating a branch.
It is in the issue tracker as issue #4867 and has been fixed in master.
Can you try running
bundle exec rake cache:clear RAILS_ENV=production
as per https://github.com/gitlabhq/gitlabhq/issues/4874