Skip to content

Commit dfd2a45

Browse files
authored
Update README.md
1 parent bdc6508 commit dfd2a45

File tree

1 file changed

+44
-47
lines changed

1 file changed

+44
-47
lines changed

README.md

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,45 @@
1+
# GitHub Repository Backup Script
12

2-
# `github` 저장소 백업 스크립트
3+
> [English](README.md) :kr: [Korean](README.ko.md)
34
4-
- `github` 저장소를 백업합니다.
5+
- Backs up a GitHub repository.
56

6-
- 윈도우즈 터미널 `cmd` 파일, 파워쉘 `ps1` 파일, `bash` `sh` 파일로 구성
7+
- Consists of a Windows Terminal `cmd` file, PowerShell `ps1` file, and `bash` `sh` file.
78

89
<br />
910

10-
## 1. `CMD` 사용 예제 (`backup_github_full.cmd`)
11+
## 1. `CMD` Usage Examples (`backup_github_full.cmd`)
1112

1213
<br />
1314

14-
### 1.1. 기본 사용 (OutDir 미지정 → 현재 폴더에 백업 생성)
15+
### 1.1. Basic Usage (OutDir not specified → backup created in the current folder)
1516

1617
```cmd
1718
backup_github_full.cmd https://github.com/j2doll/discussion.git
1819
```
1920

20-
동작:
21+
Operation:
2122

22-
- `GITHUB_TOKEN` 없음 **LITE 모드**
23-
- 실행 전에 아래와 같이 표시:
23+
- No `GITHUB_TOKEN`**LITE mode**
24+
- Before execution, the following will be displayed:
2425

25-
```
26-
Detected mode: LITE
27-
This will back up: Code+Wiki only (no metadata).
28-
Proceed with this mode? [y/N]:
29-
```
26+
```
27+
Detected mode: LITE
28+
This will back up: Code+Wiki only (no metadata).
29+
Proceed with this mode? [y/N]:
30+
```
3031

3132
<br />
3233

3334
---
3435

35-
### 1.2. 출력 경로 지정
36+
### 1.2. Specify Output Path
3637

3738
```cmd
3839
backup_github_full.cmd https://github.com/j2doll/discussion.git D:\GH_Backups
3940
```
4041

41-
백업 위치:
42+
Backup location:
4243

4344
```
4445
D:\GH_Backups\discussion_backup\
@@ -48,31 +49,31 @@ D:\GH_Backups\discussion_backup\
4849

4950
---
5051

51-
### 1.3. `FULL` 모드 실행 (환경 변수 `GITHUB_TOKEN` 사용)
52+
### 1.3. Run in `FULL` Mode (using `GITHUB_TOKEN` environment variable)
5253

5354
```cmd
5455
setx GITHUB_TOKEN "ghp_XXXXX"
5556
backup_github_full.cmd https://github.com/j2doll/discussion.git
5657
```
5758

58-
동작:
59+
Operation:
5960

60-
- 토큰 감지 → FULL 모드
61-
- 실행 전 메시지:
61+
- Token detected → FULL mode
62+
- Message before execution:
6263

63-
```
64-
Detected mode: FULL
65-
This will back up: Code+Wiki+Metadata (issues, PRs, reviews, labels, milestones, releases+assets).
66-
Proceed with this mode? [y/N]:
67-
```
64+
```
65+
Detected mode: FULL
66+
This will back up: Code+Wiki+Metadata (issues, PRs, reviews, labels, milestones, releases+assets).
67+
Proceed with this mode? [y/N]:
68+
```
6869

6970
<br />
7071

7172
---
7273

73-
### 1.4. `CMD` 내에서 `PowerShell` 없이 강제 `LITE`만 실행하고 싶을 때
74+
### 1.4. When You Want to Force `LITE` Mode Only in `CMD` Without PowerShell
7475

75-
(의도적으로 메타데이터 백업 생략)
76+
(Intentionally skip metadata backup)
7677

7778
```cmd
7879
set GITHUB_TOKEN=
@@ -83,33 +84,33 @@ backup_github_full.cmd https://github.com/j2doll/discussion.git
8384

8485
---
8586

86-
## 2. `PowerShell` 사용 예제 (`backup_github_full.ps1`)
87+
## 2. PowerShell Usage Examples (`backup_github_full.ps1`)
8788

88-
### 2.1. 기본 사용 (`OutDir` 미지정 → 현재 폴더)
89+
### 2.1. Basic Usage (OutDir not specified → current folder)
8990

9091
```powershell
9192
pwsh .\backup_github_full.ps1 -RepoUrl "https://github.com/j2doll/discussion.git"
9293
```
9394

9495
<br />
9596

96-
### 2.2. 출력 경로 지정
97+
### 2.2. Specify Output Path
9798

9899
```powershell
99100
pwsh .\backup_github_full.ps1 -RepoUrl "https://github.com/j2doll/discussion.git" -OutDir "D:\GH_Backups"
100101
```
101102

102103
<br />
103104

104-
### 2.3. `FULL` 모드 (토큰 직접 지정)
105+
### 2.3. `FULL` Mode (specify token directly)
105106

106107
```powershell
107108
pwsh .\backup_github_full.ps1 -RepoUrl "https://github.com/j2doll/discussion.git" -Token "ghp_XXXXX"
108109
```
109110

110111
<br />
111112

112-
### 2.4. `FULL` 모드 (환경 변수 이용)
113+
### 2.4. `FULL` Mode (using environment variable)
113114

114115
```powershell
115116
$env:GITHUB_TOKEN="ghp_XXXXX"
@@ -118,25 +119,25 @@ pwsh .\backup_github_full.ps1 -RepoUrl "https://github.com/j2doll/discussion.git
118119

119120
<br />
120121

121-
### 2.5. `Discussions`까지 포함 백업 (토큰 필요)
122+
### 2.5. Backup Including `Discussions` (token required)
122123

123124
```powershell
124125
pwsh .\backup_github_full.ps1 -RepoUrl "https://github.com/j2doll/discussion.git" -IncludeDiscussions
125126
```
126127

127128
<br />
128129

129-
### 2.6. `ZIP` 압축까지 생성
130+
### 2.6. Generate `ZIP` Archive
130131

131132
```powershell
132133
pwsh .\backup_github_full.ps1 -RepoUrl "https://github.com/j2doll/discussion.git" -Zip
133134
```
134135

135136
<br />
136137

137-
### 2.7. `CMD`에서 코드+위키 백업 후, `PS`에서 메타데이터만 실행 (`MetaOnly`)
138+
### 2.7. After Backing Up Code+Wiki with `CMD`, Run Metadata Only in PowerShell (`MetaOnly`)
138139

139-
(일반적으로 CMD가 내부적으로 자동 호출할 때 사용)
140+
(Usually used when CMD internally triggers PowerShell automatically)
140141

141142
```powershell
142143
pwsh .\backup_github_full.ps1 -RepoUrl "https://github.com/j2doll/discussion.git" -OutDir "D:\GH_Backups" -MetaOnly
@@ -146,16 +147,12 @@ pwsh .\backup_github_full.ps1 -RepoUrl "https://github.com/j2doll/discussion.git
146147

147148
---
148149

149-
## 3. 요약
150-
151-
| 상황 | `CMD` 예제 | `PS` 예제 |
152-
| --------------- | ------------------------------------ | ---------------------------------------------- |
153-
| 기본 백업 | `backup_github_full.cmd URL` | `pwsh .\backup_github_full.ps1 -RepoUrl "URL"` |
154-
| 출력 경로 지정 | `backup_github_full.cmd URL D:\path` | `-OutDir "D:\path"` |
155-
| `FULL` 모드 (`TOKEN`) | `setx GITHUB_TOKEN "xxx"` 후 실행 | `-Token "xxx"` 또는 `$env:GITHUB_TOKEN="xxx"` |
156-
| `Discussions`까지 | (`CMD`에서 가능) | `-IncludeDiscussions` |
157-
| `ZIP` 생성 | (`CMD`에서 수동 압축) | `-Zip` |
158-
159-
---
150+
## 3. Summary
160151

161-
152+
| Scenario | `CMD` Example | PowerShell Example |
153+
|----------|---------------|-----------------------|
154+
| Basic backup | `backup_github_full.cmd URL` | `pwsh .\backup_github_full.ps1 -RepoUrl "URL"` |
155+
| Specify output path | `backup_github_full.cmd URL D:\path` | `-OutDir "D:\path"` |
156+
| `FULL` mode (`TOKEN`) | Run after `setx GITHUB_TOKEN "xxx"` | `-Token "xxx"` or `$env:GITHUB_TOKEN="xxx"` |
157+
| Include `Discussions` | (available in CMD) | `-IncludeDiscussions` |
158+
| Generate `ZIP` | (manual compression in CMD) | `-Zip` |

0 commit comments

Comments
 (0)