R
R
RedSs2019-09-16 16:22:49
GitLab
RedSs, 2019-09-16 16:22:49

How to rollback a Gitlab version?

Hello, by mistake, when updating, I rolled up the version more than necessary. The package did not begin to install, but the migration of the database took place. When you try to roll back to the old version, it stops on database migration.

Recipe: gitlab::database_migrations
  * bash[migrate gitlab-rails database] action run
    [execute] rake aborted!
              PG::ConnectionBad: could not connect to server: No such file or directory
                Is the server running locally and accepting
                connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
              /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in `block (3 levels) in <top (required)>'
              /opt/gitlab/embedded/bin/bundle:23:in `load'
              /opt/gitlab/embedded/bin/bundle:23:in `<main>'
              Tasks: TOP => gitlab:db:configure
              (See full trace by running task with --trace)

    ================================================================================
    Error executing action `run` on resource 'bash[migrate gitlab-rails database]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of "bash"  "/tmp/chef-script20190916-29076-6c5fhi" ----
    STDOUT: rake aborted!
    PG::ConnectionBad: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
    /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in `block (3 levels) in <top (required)>'
    /opt/gitlab/embedded/bin/bundle:23:in `load'
    /opt/gitlab/embedded/bin/bundle:23:in `<main>'
    Tasks: TOP => gitlab:db:configure
    (See full trace by running task with --trace)
    STDERR:
    ---- End output of "bash"  "/tmp/chef-script20190916-29076-6c5fhi" ----
    Ran "bash"  "/tmp/chef-script20190916-29076-6c5fhi" returned 1

refers to missing file in
/var/opt/gitlab/postgresql/.s.PGSQL.5432"
How do I restore an old version of Gitlab?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
belegnar, 2020-05-31
@belegnar

No way. Most likely, the database is destroyed for some reason (not enough space, for example)
The easiest way is to bang the `data/posgresql` directory and restore from backup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question