InfoGrab Docs

백업 아카이브 프로세스

백업 아카이브 프로세스에 대해 설명합니다.

백업 명령 을 실행하면 백업 스크립트가 GitLab 데이터를 저장하기 위한 백업 아카이브 파일을 생성합니다. 아카이브 파일을 생성하기 위해 백업 스크립트는: 증분 백업을 수행할 때 이전 백업 아카이브 파일을 추출합니다. 백업 아카이브 파일을 업데이트하거나 생성합니다. 모든 백업 하위 작업을 실행하여: 데이터베이스 백업 . Git 저장소 백업 . 파일 백업 . 백업 스테이징 영역을 tar 파일로 아카이브합니다. 구성된 경우 새 백업 아카이브를 개체 저장소에 업로드합니다. 아카이브된 백업 스테이징 디렉토리 파일을 정리합니다. 데이터베이스 백업 # 데이터베이스를 백업하기 위해 db 하위 작업은: pg_dump 를 사용하여 SQL 덤프 를 생성합니다. pg_dump 의 출력을 gzip 을 통해 파이프하고 압축된 SQL 파일을 생성합니다. 파일을 백업 스테이징 디렉토리 에 저장합니다. Git 저장소 백업 # Git 저장소를 백업하기 위해 repositories 하위 작업은: gitaly-backup 에 백업할 저장소를 알립니다. gitaly-backup 을 실행하여: Gitaly에 대한 일련의 원격 프로시저 호출(RPC)을 실행합니다. 각 저장소의 백업 데이터를 수집합니다. 수집된 데이터를 백업 스테이징 디렉토리 의 디렉토리 구조로 스트리밍합니다. 다음 다이어그램은 프로세스를 설명합니다: Mermaid 다이어그램 (24줄) 소스 코드 보기 %%{init: { "fontFamily": "GitLab Sans" }}%% sequenceDiagram accTitle: Git repository backup workflow accDescr: Sequence diagram showing the repositories sub-task calling gitaly-backup with a list of repositories. For each repository, gitaly-backup uses RPCs to collect refs, create a bundle, and retrieve custom hooks. It then returns success or failure. box Backup host participant Repositories sub-task participant gitaly-backup end Repositories sub-task->>+gitaly-backup: List of repositories loop Each repository gitaly-backup->>+Gitaly: ListRefs request Gitaly->>-gitaly-backup: List of Git references gitaly-backup->>+Gitaly: CreateBundleFromRefList request Gitaly->>-gitaly-backup: Git bundle file gitaly-backup-&#