GitLab Incremental BackUp

2.8k Views Asked by At

Now everyday i'm taking the full back-up of gitlab-CE 8.12.4 server whose size is more than 4 GB. Is there any way or work-around to take the incremental backup of gitlab-CE server.

2

There are 2 best solutions below

0
On

There are multiple components being backed up when running the gitlab backups rake task:

The database entries (notes, issues, events, projects, users etc etc) and then the actual git data.

The backup rake task just takes a copy of everything and tars it up.

If you want to create your own backup strategy, you can do that easily, just separate the two tasks out and use backup strategies for the respective components.

MySQL database incremental backups: https://dev.mysql.com/doc/mysql-enterprise-backup/4.0/en/mysqlbackup.incremental.html

With the git data, depending on your backend file system you can use snapshots and rsync to get this done. There's more information here: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md#alternative-backup-strategies

The options you choose will depend on your environment as always, but I would advise 1) testing your restores regularly, and 2) still taking regular full backups using the rake task.

0
On

GitLab 14.10 (April 2022) does have an official feature:

Incremental repository backups reduce backup time

We are pleased to offer our self-managed customers an opportunity to use our preliminary incremental backup offering.

After you take at least one full backup, you can run subsequent incremental backups that only pack repository changes since the last backup into the backup bundle. This dramatically reduces backup time.

While this is available now, we want to clarify that each incremental backup overwrites the last incremental backup, and remind you that this is our MVC.

Please feel free to try out this exciting new feature and don’t hesitate to provide feedback!

See our Repository level incremental backup epic for updates on progress on this feature!

See Documentation and Issue.