Simple script for validating GitLab backups.
- Docker
- Python 3.6+
- pip3
The script will start a GitLab instance using the gitlab/gitlab-ce Docker image. It will then restore the backup and run a series of tests to verify the backup is valid. The tests are simple and small. They check if:
- the GitLab instance is working
- the number of users and projects is correct
- it is possible to create a new project
- Install the Python dependencies:
pip3 install -r requirements.txt. - Set the
$GITLAB_HOMEvariable intest.sh(or set environmental variable) to the path which Docker will mount the GitLab data directory to. - Set
config.yamlto match your GitLab configuration. - Place your GitLab backup (config backup is also required) in the root directory of this repostitory. They will be copied to
$GITLAB_HOME/backupswhen the script is run. - Run the script:
./test.sh.