Push Event Backups
Push event backups let you automatically create a backup every time code is pushed to a repository. This ensures your latest changes are always protected.
How It Works
When push event backups are enabled for a repository, GitSec listens for push webhooks from your Git provider. Each time a push is detected, a backup is automatically triggered with your configured scope settings.
On GitLab, you do not need to add a webhook yourself: GitSec registers the project webhook for push and tag push events during its sync. A Self-Managed GitLab instance must be able to reach GitSec for these events to arrive.
The repository list shows which repositories back up on every push. For repositories where push events are not supported, the indicator shows Push event not available. See Managing Repositories.
Enabling Push Event Backups
-
Navigate to Repositories > GitHub, Repositories > GitLab, or Repositories > Bitbucket in the sidebar.
-
Click on the repository you want to configure.
-
Go to the Push Event tab.
-
Toggle the Enable switch to turn on push event backups.
-
Under Scopes, select which scopes to include. Code & Commits is always included. The other scopes depend on the provider:
- GitHub: Repository Metadata, Pull Requests, Issues, Releases, Collaborators
- GitLab: Repository Metadata, Merge Requests, Merge Request Comments, Issues, Releases, Collaborators
- Bitbucket: Repository Metadata, Pull Requests
See Backup Scopes for what each scope contains.
Push event backups are ideal for critical repositories where you need continuous protection. For less active repositories, a recurring scheduler may be more efficient.
Disabling Push Event Backups
To stop automatic backups on push:
- Open the repository detail page.
- Go to the Push Event tab.
- Toggle the switch off.
Existing backups created by push events will not be affected.
Push Events vs. Scheduled Backups
| Feature | Push Event | Scheduled |
|---|---|---|
| Trigger | Every git push | At a configured interval (minutely to monthly, or CRON) |
| Best for | Active repositories with frequent commits | Repositories with periodic changes |
| Frequency | As often as pushes occur | Based on configured interval (minutes to months) |
| Configuration | Per-repository toggle | Per-repository scheduler form |
Both methods can be used simultaneously on the same repository.