Using an external postgres database
Caution
This is a Legacy blog post. I wrote this many years ago. The content may not be up to date or relevant in the current times. Please google elsewhere if you’re following this as a single source.
So I have a gitlab server, it’s running on https://git.volkor.me/ I use it for my personal projects, along with learning how to properly setup environments and such.
sudo apt update && sudo apt dist-upgrade
sudo gitlab-rake gitlab:backup:create
scp /var/opt/gitlab/backups/XXXXXXXXX_gitlab_backup.tar NEW_SERVER_IP:~
gitlab-ctl reconfigure
gitlab-ctl stop unicorn && gitlab-ctl stop sidekiq
gitlab-rake gitlab:backup:restore BACKUP=XXXXXXXXX
gitlab-ctl start && gitlab-rake gitlab:check SANITIZE=true
Due to this bug/error you must temporarily give superuser permissions to postgres user (git) do this for the first reconfigure then.
sudo -u postgres psql
Give superuser: alter role git superuser;
Revoke superuser alter role git nosuperuser;
You’re done now, you can close this page (or look at my other stuff I guess)
like comment and subscribe