Files
nexus/wiki/concepts/Repo-Mirroring.md
2026-04-29 04:03:31 +08:00

50 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Repo Mirroring"
type: concept
tags: [Repo-Mirroring, Git, Synchronization, Migration, GitHub, GitLab]
sources:
- public-cloud-learning-sessions-opentext-github-enterprise-to-gitlab-migration-20
last_updated: 2026-05-09
---
## Repo Mirroring
Repo Mirroring仓库镜像同步是一种将源代码仓库从一个平台同步到另一个平台的方案在 GitHub Enterprise → GitLab 迁移中作为两种主要迁移策略之一。
## Definition
镜像同步方案:在保留源 GitHub 仓库的同时,将仓库内容实时或定期同步到 GitLab源仓库保持不变允许双写同时在两个平台操作
## 适用场景
- 需要在迁移过渡期保持 GitHub 仓库的外部访问权限
- 有持续向 GitHub 提交的场景(如外部贡献者)
- 团队希望在正式切换前有充足的验证时间
## 优势
- **降低风险**:源仓库保持不变,回滚成本低
- **渐进迁移**:可以逐步增加 GitLab 的使用比例
- **并行验证**:新旧平台同时可用,便于对比验证
## 局限性
- 双平台维护增加运营成本
- 同步延迟可能导致代码不一致
- 不解决 CI/CD 流水线迁移问题
## 与 Shift and Lift 的对比
| 维度 | Mirroring | Shift and Lift |
|------|-----------|----------------|
| 源仓库 | 保持不变 | 废弃 |
| 流水线 | 保持原样 | 需重构 |
| 风险 | 低 | 中高 |
| 适用场景 | 过渡期验证 | 明确迁移决心后 |
详见 [[Shift-and-Lift]] 迁移方案
## Sources
- [[public-cloud-learning-sessions-opentext-github-enterprise-to-gitlab-migration-20]]