Backup by `git clone --mirror` for each repository in git-data directory

I’m trying to backup gitlab server.

Since gitlab support full backup only, I’d like to mirror all repository instead.

I found that all repositories reside in /var/opt/gitlab/git-data/repositories by default.

Can I backup all repositories by doing git clone --mirror /var/opt/gitlab/git-data/repositories/user/repo.git for each user/repo?

I would guess you can do the steps you describe, but whether you can then restore your backups is another question.

I’d rather suggest you to do a full backup as described in the documentation.

I’ve already tried full backup and I concluded it’s too slow and requires too large storage for frequent(hourly or daily) backup.

The purpose of backup by mirroring is keeping git repositories. It doesn’t matter that I can restore gitlab server itself.

Or, do you recommend mirroring the host address instead of direct clone from git-data for such purpose?