recently I was forced to migrate from VPS hosting I had. I was away from home when I was asked to perform backups before the end of lease, so I had no time to backup all of the data in a way that backup should've been performed and that left me with all of my VPS data packed into a single .tar.gz.
Almost everything went smooth, the last thing that gives me nightmares is restoring my previous Gitlab-CE data.
This time I went with the dockerized version of Gitlab-CE. (gitlab/gitlab-ce:12.4.0-ce.0)
To be sure that I am not using wrong version during this process, I extracted which version I had installed from one of license files found in the backup.
I have confirmed that this image works without my data being mounted to volumes, but whenever I've tried to mount volumes recovered from backup:
/home/gitlab/logs:/var/log/gitlab
/home/gitlab/data:/var/opt/gitlab
/home/gitlab/config:/etc/gitlab
I was stuck with a fatal error regarding postgres db:
[execute] psql: FATAL: database locale is incompatible with operating system
DETAIL: The database was initialized with LC_COLLATE "en_US.UTF-8", which is not recognized by setlocale().
HINT: Recreate the database with another locale or install the missing locale.
I have tried setting ENV variables LANG, LANGUAGE, LC_ALL to different values without any luck.
I was not able to find solution on the internet so far, I wish I could've made a backup properly.
My wish is to restore old repositories (and if possible user accounts) from old installation I have stored.
Anything that could lead me into possible solution is very much appreciated!
This is my first question on stack so please forgive me if it is formed improperly, or is being asked in a wrong section.
As in this thread, try and check if locales/tzdata are missing:
apt-get update && apt-get install -yqq locales tzdata && locale-gen en_US.UTF-8
This is similar to postgres-ai/custom-images
issues/4, which means, if it works at runtime, you might have to build your own GitLab image, with:
RUN apt-get install -yqq locales locales-all tzdata && locale-gen en_US.UTF-8