Git Lab Data Restoration

Hi,

I am currently using Gitlab Community edition installed on an Linux Server. Since we are migrating our project on AWS So we setup a new gitlab server for different environments quite frequently and we generally do that by taking a copy of that server and istall it on a new environment. But now i am planning for a fresh Clean GITLAB Installation on a new server so is there any way that my old projects are available on this new Server. To be Precise is there any data Directory which can be copy pasted on our new environment.

Thanks

Take the backup of the gitlab system by use this command

gitlab-rake gitlab:backup:create
gitlab-rake gitlab:backup:create STRATEGY=copy

Then change the directory by use this commnad

cd /var/opt/gitlab/backups/

And check the tar file in backup directory by use this command

ls -l

And then stop the service of unicorn,sidekiq by use this command

gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq

And then check the status of the gitlab services by use this command

gitlab-ctl status

And then restore the tar file by use this command

gitlab-rake gitlab:backup:restore BACKUP=“your tar file”

restart and check gitlab

gitlab-ctl restart
gitlab-rake gitlab:check SANITIZE=true

For more details please refer below link:
https://docs.gitlab.com/ee/raketasks/backup_restore.html