Problem restoring Backup on GitLab 11.3.1

backup

#1

Hello,
I recently had to backup our GitLab-CE instance in order to update the whole server. To do so I ran /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1
copied the generated tar.gz-file as well as gitlab.rb, gitlab-secrets.json and the trusted-certs folder.

On the newly set up server I installed GitLab again, ran gitlab-ctl reconfigure and copied the previously generated tar.gz-file to /var/opt/gitlab/backups/ as well as the other files, overwriting the default ones.

But when I run gitlab-rake gitlab:backup:restore BACKUP=... I get an error saying that:

Unpacking backup ... done
Before restoring the database, we will remove all existing
tables to avoid future upgrade problems. Be aware that if you have
custom tables in the GitLab database these tables and all data will be
removed.

Do you want to continue (yes/no)? yes
Removing all tables. Press `Ctrl-C` within 5 seconds to abort
Cleaning the database ... 
rake aborted!
PG::ConnectionBad: could not fork new process for connection: Resource temporarily unavailable
could not fork new process for connection: Resource temporarily unavailable
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:27:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:51: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:drop_tables
(See full trace by running task with --trace)

When I try running gitlab-ctl reconfigure again with the restored configs I get an:

There was an error running gitlab-ctl reconfigure:

postgresql_user[gitlab] (postgresql::enable line 195) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[create gitlab postgresql user] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/postgresql/resources/user.rb line 11) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'                                                                                                                                                        
---- Begin output of /opt/gitlab/bin/gitlab-psql -d template1 -c "CREATE USER \"gitlab\"" ----                                                                                                                                                     
STDOUT:                                                                                                                                                                                                                                            
STDERR: psql: could not fork new process for connection: Resource temporarily unavailable                                                                                                                                                          
could not fork new process for connection: Resource temporarily unavailable                                                                                                                                                                        
---- End output of /opt/gitlab/bin/gitlab-psql -d template1 -c "CREATE USER \"gitlab\"" ----                                                                                                                                                       
Ran /opt/gitlab/bin/gitlab-psql -d template1 -c "CREATE USER \"gitlab\"" returned 2  

Does anyone please have an idea what this might be and how to fix it?

Best,
Hering

Edit: Try to set one setting in the config after the other to default I managed to run gitlab-ctl reconfigure successfully now but when trying to restore the backup it fails with:

* group/project ... Error: 13:CreateRepositoryFromBundle: cmd start failed: GitCommand: start [/opt/gitlab/embedded/bin/git clone --bare -- /var/opt/gitlab/git-data/repositories/+gitaly/tmp/repo201680210/repo.bundle [REPO PATH]]: fork/exec /opt/gitlab/embedded/bin/git: resource temporarily unavailable

on every single repository. :frowning: