How to automate gitlab backup?

Is there any configuration in gitlab where i can automate the backup daily/weekly?

I have done this creating a script and cron job for my gitlab-ce installation. I can share it if you like. When I get on my laptop tomorrow morning I will post it.

So I do my backup like this:

# Script to backup gitlab-ce

# Variables
PKGVER=`dpkg -l | grep -i gitlab | awk '{print $3}'`
BACKUPDATE=`date '+%F'`

# Cleanup old backups and wait a minute
find $BACKUPDIR -type f -ctime +2 -exec rm -f {} \;
sleep 60

# Remove existing gitlab backups

# Backup Gitlab
sudo -u git -H gitlab-rake gitlab:backup:create

# Backup Gitlab config

the variables at the top allow me to dynamically alter the filenames when a new version of gitlab is installed/upgraded, as you can see from below:

root@repo:~/scripts# ls /backups/gitlab/
gitlab-13.4.1-ce.0-config-2020-09-28.tar.bz2  gitlab-13.4.1-ce.0-data-2020-09-28.tar.bz2
gitlab-13.4.1-ce.0-config-2020-09-29.tar.bz2  gitlab-13.4.1-ce.0-data-2020-09-29.tar.bz2
gitlab-13.4.1-ce.0-config-2020-09-30.tar.bz2  gitlab-13.4.1-ce.0-data-2020-09-30.tar.bz2
gitlab-13.4.1-ce.0-config-2020-10-01.tar.bz2  gitlab-13.4.1-ce.0-data-2020-10-01.tar.bz2

the backup takes the config so /etc/gitlab and the database backups. If you want to add to this the repo data, then you need to add /var/opt/gitlab/git-data to the script. I actually do that however using a Synology NAS and the backup application on there takes the filesystem as well as the /backups directory so that I have it away from the server in the event of failure.

Hope it helps!