증분백업 로직 개선

This commit is contained in:
Lectom C Han
2025-12-16 13:24:56 +09:00
parent 2027880b9a
commit ede73f4434
3 changed files with 5 additions and 1 deletions

View File

@@ -226,6 +226,10 @@ jobs:
fi fi
git remote add origin "${GITEA_REMOTE}" git remote add origin "${GITEA_REMOTE}"
git remote add source "${source_repo_url}" git remote add source "${source_repo_url}"
echo "Seeding objects from target main for delta fetch..."
if ! git fetch --no-tags origin "+refs/heads/main:refs/heads/main"; then
echo "::warning::Failed to fetch target main; continuing without seed"
fi
fi fi
echo "Fetching latest branch '${branch_name}' from source..." echo "Fetching latest branch '${branch_name}' from source..."

View File

@@ -11,7 +11,6 @@ dev.git/develop
dev.git/develop_boxzainer dev.git/develop_boxzainer
dev.git/develop_boxzainer_demo dev.git/develop_boxzainer_demo
dev.git/develop_brizainer dev.git/develop_brizainer
dev.git/develop_heh
dev.git/develop_hmEG dev.git/develop_hmEG
dev.git/develop_hmEG_DotNET_7 dev.git/develop_hmEG_DotNET_7
dev.git/develop_tunnelzainer dev.git/develop_tunnelzainer

View File

@@ -16,3 +16,4 @@
2025-12-16 09:42:00 KST 추가 업데이트: mirror.yml에서 타겟이 존재할 때 `git ls-remote`로 main 커밋을 조회하고 소스 브랜치 커밋과 동일하면 클론/푸시를 건너뛰도록 최적화. 알림에 skip 상태를 추가해 동일 커밋 시 건너뛰는 로그를 남기도록 개선. 2025-12-16 09:42:00 KST 추가 업데이트: mirror.yml에서 타겟이 존재할 때 `git ls-remote`로 main 커밋을 조회하고 소스 브랜치 커밋과 동일하면 클론/푸시를 건너뛰도록 최적화. 알림에 skip 상태를 추가해 동일 커밋 시 건너뛰는 로그를 남기도록 개선.
2025-12-16 09:46:30 KST 추가 업데이트: mirror.yml에서 기존 타겟 클론을 없애고 임시 bare repo를 직접 init 후 source 브랜치만 fetch(--no-tags)하여 푸시하도록 변경, 불필요한 대상 전체 클론을 제거해 데이터 전송 최소화. 2025-12-16 09:46:30 KST 추가 업데이트: mirror.yml에서 기존 타겟 클론을 없애고 임시 bare repo를 직접 init 후 source 브랜치만 fetch(--no-tags)하여 푸시하도록 변경, 불필요한 대상 전체 클론을 제거해 데이터 전송 최소화.
2025-12-16 09:48:20 KST 추가 업데이트: mirror.yml에서 타겟이 새로 생성된 경우 소스 브랜치를 `git clone --bare --single-branch`로 전체 클론 후 push, 기존 타겟이 있을 때만 빈 bare repo를 init해 필요한 브랜치만 fetch→push 하도록 분기. 생성된 경우에도 백업 모드/알림이 “신규 전체 백업”으로 정확히 표시되도록 just_created 플래그를 추가. 2025-12-16 09:48:20 KST 추가 업데이트: mirror.yml에서 타겟이 새로 생성된 경우 소스 브랜치를 `git clone --bare --single-branch`로 전체 클론 후 push, 기존 타겟이 있을 때만 빈 bare repo를 init해 필요한 브랜치만 fetch→push 하도록 분기. 생성된 경우에도 백업 모드/알림이 “신규 전체 백업”으로 정확히 표시되도록 just_created 플래그를 추가.
2025-12-16 11:10:39 KST 추가 업데이트: 증분 경로에서 빈 bare init 후 타겟 main을 `fetch --no-tags`로 선반입해 객체를 시드한 뒤 소스 브랜치 fetch를 수행하도록 변경, 델타 전송을 활용해 변경량이 적을 때 트래픽을 줄이도록 개선.