If you have a readonly system on your GitLab system then this method is recommended. Log into root
user of your gitlab system.
cat ~git/gitlab/config/database.yml
to get your database credentials and backup DB to remote system.
unset HISTFILE
/usr/bin/mysqldump -u GITLAB_DB_USER_CHANGEME -pGITLAB_DB_PASS_CHANGEME --skip-extended-insert --create-options --databases GITLAB_DATABASE_CHANGEME | gzip -c - | ssh user@remotehost.com 'cat > gitlab_backup_db.mysql.gz'
Backup repositories.