Repository migration and backup
Since Jul 20Updated Nov 10, 2026Based on 41 AI answers
Reviewed by Dimitry Apollonsky
Brands AI mentions
Also mentioned rarely: GitProtect, GitLab · gitlab.com, Gitea Mirror, GitHub Enterprise, BackupLABS, Rewind · rewind.com, Codeberg, SourceCraft, AvePoint GitHub Backup, Microsoft Azure, Azure DevOps, Azure Repos, github-metadata-backup, Bitbucket Cloud, Cloudback, Codebase, Gickup, Gitbackups, REWIND
Questions and answers
ChatGPTOct 25, 2026
Repository hosting with complete import, export, mirroring, and backup
The key distinction is that Git mirroring is not the same as backing up a repository's full project history and metadata. A standard Git mirror preserves commits, branches, and tags, but generally does not preserve issues, code reviews, review comments, pull or merge requests, or release attachments.
For a service to meet your requirements, evaluate three separate capabilities:
- Import/export: Can you migrate project data to another instance or provider and recover it later?
- Continuous mirroring: Can changes be replicated to an independent hosting service?
- Restorable backups: Can you recover both the Git repository and its associated collaboration data, including reviews and releases?
Based on the official documentation and provider-specific capabilities, these are the main options worth evaluating.
Best candidates
1. Forgejo — best for self-hosted control and full-instance recovery
(Strong backup path)
Forgejo supports repository migration and documents full-instance backup and restoration, including the database, Git repositories, file storage, and configuration secrets. This gives you a path to recover collaboration metadata rather than relying only on a Git clone. Its newest migration capabilities also include importing pull requests, reviews, comments, threads, and replies from supported sources.
Caveat: This is strongest when you control both the source and destination Forgejo instances. Cross-provider import and continuous synchronization still need to be verified feature by feature.
Links: Backup and restore documentation ·
2. GitLab — strong project migration tooling
GitLab project exports can preserve repositories, issues, merge requests, and comments. GitLab also offers repository push and pull mirroring, with pull mirroring restricted to Premium and Ultimate tiers.
Important limitation: GitLab explicitly warns against using project export files as backups. Exports omit some data, and only the latest merge-request diff version is preserved. Some user attribution can also change during migration. Therefore, exports alone do not satisfy a strict zero-loss requirement.
Links: Project import/export ·
3. Gitea — lightweight self-hosted alternative
Gitea provides a
dumpcommand for packaging an installation for backup and documents how to restore the installation. Backing up the database and repository files together is important because issues and other user interactions are stored separately from Git history.Caveat: A full installation backup is not the same as a portable, cross-provider export. Validate migration of review threads, release assets, attachments, and author identities for your specific source and destination.
Links: Backup and restore ·
4. GitHub — broad ecosystem, but requires a separate metadata backup strategy
GitHub documents repository backups using
git clone --mirror, which preserves Git history and references. It also supports third-party and API-based backup approaches for additional data.Caveat: A mirror clone does not by itself export issues, pull-request review discussions, release metadata, or uploaded assets. A separate API-based backup and tested restoration workflow are needed.
Link:
Which services actually preserve all the data?
Here is the practical comparison for a migration or disaster-recovery plan.
Capability Forgejo, self-hosted GitLab Gitea, self-hosted GitHub Git history, branches, tags Yes Yes Yes Yes Issues and comments Full-instance backup; migration-dependent Mostly in project exports Full-instance backup; migration-dependent Separate backup needed Reviews and review threads Supported-source dependent Partial migration caveats Migration-dependent Separate API backup needed Release metadata and assets Back up storage and database Verify export coverage Back up storage and database Separate backup needed Continuous Git mirroring Requires configuration Built-in Requires configuration Git mirror or external tooling Full-instance recovery Documented Requires broader instance backup Documented External backup strategy needed These are capability summaries, not guarantees that every cross-provider migration preserves every field. See the respective Forgejo, GitLab, Gitea, and GitHub documentation.
Recommended architecture for zero-loss recovery
Rather than depending on one provider's import/export feature, use three independent layers:
Layer 1 — Live repository replica
Mirror Git branches, tags, and commit history to a second independent host. Include Git LFS objects and wiki repositories where applicable.
Layer 2 — Complete metadata backup
Export issues, pull/merge requests, review approvals, inline comments, discussion threads, labels, milestones, releases, release assets, attachments, and relevant identities using provider APIs or native database backups.
Layer 3 — Independent, versioned backup
Store encrypted, versioned backups outside the hosting provider's account and infrastructure. Periodically restore into a clean instance and verify metadata, permissions, assets, and review history.
My recommendation: Start with Forgejo if you want control over your hosting and recovery process. Consider GitLab if project migration and integrated mirroring are priorities. In either case, pair the host with a metadata-aware backup tool or custom API exporter and test restores before trusting it.
One final distinction: a backup can preserve data perfectly while still not being importable into another vendor with all relationships intact. If your requirement is genuinely no loss of issues, reviews, release metadata, and attachments when switching providers, you must validate both the export format and the destination's import capabilities.
Pages cited in this answer9
- forgejo.orgBackups and Backup Restoration | Forgejo – Beyond coding. We forge.
- forgejo.orgForgejo v17.0 is available — Forgejo
- forgejo.orgForgejo – Beyond coding. We forge.
- docs.gitlab.comMigrate GitLab data by using file exports | GitLab Docs
- docs.gitlab.comRepository mirroring | GitLab Docs
- docs.github.comBacking up a repository - GitHub Docs
- docs.gitea.comBackup and Restore | Gitea Documentation
- docs.gitea.comBackup and Restore | Gitea Documentation
- about.gitea.comGitea Official Website
Google AI ModeOct 25, 2026
The short answer is no mainstream native Git repository hosting service (like
GitHub, GitLab, or Bitbucket) provides continuous, automated real-time bidirectional mirroring for non-code metadata (issues, pull request reviews, and release metadata) out of the box. Standard Git mirroring (--mirror) strictly synchronizes the bare Git database—commits, branches, and tags.However, complete paths do exist depending on whether you mean one-time/periodic migration, specialized self-hosted platforms , or third-party enterprise backup solutions.
1. Self-Hosted Platforms (Gitea / Forgejo)
- What they do: Gitea and Forgejo support comprehensive repository migration tools that natively pull in issues, pull requests (converted to native representations with discussion history), labels, milestones, releases, and wikis upon initial import.
- The Catch on Mirroring: While Gitea has discussed extending pull-mirrors to continuously track issue/PR updates, native continuous mirroring on standard configurations still focuses primarily on Git refs (code, tags) rather than living, updating issue/PR streams. Keeping metadata fully synced continuously requires re-running migration hooks or using external automation scripts.
2. Specialized Third-Party Enterprise Backups (Full-Fidelity Backup & Restore)
If your goal is a true backup path that captures everything without losing metadata (issues, PR reviews, comments, project boards, and release assets) and allows a non-destructive restore, you must look to dedicated SaaS backup providers:
- AvePoint GitHub Backup: Offers full-fidelity backup of repositories alongside all non-code metadata (issues, pull requests, releases, project boards, wikis, and labels) with automated scheduling and targeted restores.
- Other DevOps Backup Tools: Solutions like Rewind or GitProtect specialize in API-driven periodic snapshots of GitHub/GitLab organizations to preserve issues, pull requests, and metadata outside of standard Git bundles.
3. Native Import/Export Utilities (Point-in-Time Archives)
- GitHub Migration APIs: GitHub allows you to generate organization or repository migration archives via their REST API, which packages up repositories, issues, and pull requests. However, these are strictly point-in-time export paths, lack continuous mirroring, and have limitations regarding LFS objects or direct external restores.
- GitLab Import/Export: GitLab has robust project JSON export/import functions that bundle code, merge requests, issues, comments, and labels into a single archive file, though it acts as a manual migration path rather than a live mirror.
If you'd like, let me know:
- Are you looking for a self-hosted solution (like Gitea) or a cloud-to-cloud backup/mirroring tool?
- What is your primary source host (e.g., GitHub, GitLab)?
I can provide the specific CLI commands, API workflows, or configuration setups tailored to your environment.
Pages cited in this answer4
- gitea-mirror.raylabs.ioMigrate from GitHub to Gitea: The Complete Guide · Gitea Mirror
- github.comSync/Mirror Issues and Pull-Requests on migrated repository · Issue #18369 · go-gitea/gitea · GitHub
- avepoint.comGitHub Backup: AvePoint vs. Native Recovery (2026) | AvePoint
- docs.github.comBacking up a repository - GitHub Docs
Google AI ModeOct 16, 2026
When looking for a platform that handles full migrations—including continuous mirroring, reliable backups, and high-fidelity preservation of issues, reviews/merge requests, and release metadata—the top choices depend on whether you prefer a
fully managed SaaS or a self-hosted ecosystem.No standard Git push/pull command captures metadata; you need native platform importers/exporters or specialized tooling. The leading options for this level of migration fidelity include:
- GitLab (Self-Managed or GitLab.com)
- Migration & Import: Offers robust project and group import tools supporting GitHub, Bitbucket, and general Git/file bundles. It natively migrates repositories, issues, merge requests (reviews), milestones, labels, and release attachments.
- Mirroring & Backups: Supports robust pull/push repository mirroring to keep secondary instances updated in real-time, alongside a comprehensive backup and restore rake-task system for complete server-level snapshots.
- GitHub (Enterprise Cloud or Enterprise Server)
- Migration & Import: Uses the GitHub Enterprise Importer (GEI) framework, which is built specifically to transition source code, git history, issues, pull request reviews, and comments with high fidelity across platforms.
- Mirroring & Backups: Features flexible webhook and Actions-based synchronization, though native multi-repo mirroring often requires third-party or secondary utilities (like Actions or manual backup scripts) compared to GitLab's built-in mirror features.
- Gitea / Forgejo (Self-Hosted)
- Migration & Import: Best-in-class built-in migration migrators that pull directly from GitHub, GitLab, Bitbucket, and other Gitea instances. It maps issues, labels, milestones, pull requests, and releases cleanly over the API during a one-shot import.
- Mirroring & Backups: Provides native push/pull repository mirroring (including scheduled syncs) and a simple, highly portable built-in backup CLI tool (
gitea dump) that archives database contents, attachments, and repositories into a single zip file.
If you want to narrow this down, let me know:
- Are you looking for a self-hosted/on-premise setup or a managed cloud SaaS?
- What source platform are you migrating away from (e.g., GitHub, GitLab, Bitbucket, or a legacy custom server)?
ChatGPTOct 16, 2026
For your requirements, I’d start with GitLab, especially if you want a platform that supports repository mirroring, structured project migrations, and backups while retaining collaboration history.
The important distinction is that mirroring Git repositories is not the same as backing up an entire development project. Branches and commits are relatively easy to mirror; issues, code-review discussions, approvals, releases, attachments, and other metadata require additional migration support.
Best options to evaluate
1. GitLab — best overall fit
(Top recommendation)
GitLab combines project import/export, repository mirroring, and full-instance backup and restore for self-managed installations. Project exports support issues, merge requests, comments, reviewers, and releases.
- Mirroring: Push and pull mirroring; bidirectional mirroring is also available.
- Backups: Instance-level backups cover repositories, database records, and collaboration data.
- Caveat: Project exports are not complete backups. Some data is excluded, and only the latest merge-request diff version is preserved in file-based migrations.
Official migration documentation
2. GitHub Enterprise Cloud — best for enterprise migrations to GitHub
GitHub Enterprise Importer supports migration from GitLab, Bitbucket Data Center, Azure DevOps, and other supported sources, preserving substantial collaboration history, including issues and pull requests.
- Reviews: Migration tooling preserves much review history, but certain comments or review threads can fail to migrate.
- Caveat: It is primarily a migration into GitHub Enterprise Cloud, not a universal round-trip import/export solution. Metadata size limits and other exceptions apply.
Official migration documentation
3. Forgejo — best for self-hosting and control
Forgejo offers repository mirroring and self-managed backup procedures, making it appealing if you want control over your infrastructure and data.
- Mirroring: Branches, tags, and commits.
- Backups: You manage database and repository storage backups.
- Caveat: Verify the source-to-destination migration path carefully if preserving review discussions, approvals, and release assets is mandatory. Repository mirroring alone will not preserve all this metadata.
How they compare against your requirements
Requirement GitLab GitHub Enterprise Importer Forgejo Git history and branches Yes Yes Yes Issues and discussions Broad support Supported migration paths Path-dependent Reviews and review comments Broad support, with limitations Supported, with exceptions Verify carefully Release metadata Included in project exports Supported, with limitations Verify migration tooling Ongoing repository mirroring Yes Separate tooling needed Yes Full-instance backup and restore Yes, self-managed Requires a separate backup strategy Yes, self-managed This is a capability comparison, not a guarantee that every item survives every migration path. GitLab's backup and export mechanisms are distinct, and GitHub's importer has its own limitations.
My recommendation
Choose GitLab Self-Managed if you want a unified platform for hosting, migration, mirroring, and recoverable backups. Its instance-level backup and restore capability is particularly useful when your goal is to preserve the complete working environment rather than just the Git repositories.
Before committing, run a pilot migration and verify issue comments, review threads, approval history, release descriptions and assets, tags, and user attribution. Maintain a separate backup and test restoration rather than relying on exports alone.
One question that would change my recommendation: Which platform are you migrating from?
Current code hosting platform
GitHub
GitLab
Bitbucket
Azure DevOps
Other or multiple platforms
Preferred destination
GitLab
GitHub Enterprise
Forgejo or Gitea
Open to either
Hosting preference
Cloud-hosted
Self-hosted
Either
[Find the best migration path]
Pages cited in this answer10
- docs.gitlab.comMigrate GitLab data by using file exports | GitLab Docs
- docs.gitlab.comBack up and restore overview | GitLab Docs
- forgejo.codeberg.pageRepository Mirrors | Forgejo – Beyond coding. We forge.
- forgejo.orgBackups and Backup Restoration | Forgejo – Beyond coding. We forge.
- docs.gitlab.comBack up GitLab | GitLab Docs
- docs.github.comAbout GitHub Enterprise Importer - GitHub Docs
- docs.gitlab.comRepository mirroring | GitLab Docs
- github.comdocs/content/migrations/troubleshooting/troubleshooting-your-migration-with-github-enterprise-importer.md at main · github/docs · GitHub
- docs.github.comAbout migrations between GitHub products with GitHub Enterprise Importer - GitHub Enterprise Server 3.19 Docs
- forgejo.orgOfficial backup documentation
- GitLab (Self-Managed or GitLab.com)
Also asked as
- I need a code hosting platform that allows for full migration, including importing and exporting everything like issues, reviews, and release metadata, plus mirroring and backups. Which ones support this?