diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 46 |
1 files changed, 44 insertions, 2 deletions
@@ -5,15 +5,57 @@ 1. 마이그레이션을 위한 최소 압축 ```bash -zip -r archive_$(date +%Y%m%d_%H%M%S).zip . -x "node_modules/*" "public/*" ".next/*" ".git/*" "tmp/*" +# zip 은 심볼릭 링크 정보가 누락되는 문제 있음 +# zip -r archive_$(date +%Y%m%d_%H%M%S).zip . -x "node_modules/*" "public/*" ".next/*" ".git/*" "tmp/*" "temp/*" + +# h 옵션 필수임. 심볼릭링크 날려먹으면 node_modules 내부에서 문제생김. + +tar -czhvf archive_$(date +%Y%m%d_%H%M%S).tar.gz --exclude="node_modules" --exclude="public" --exclude=".next" --exclude=".git" --exclude="tmp" --exclude="temp" . ``` 2. 전체 압축 ```bash -zip -r archive_$(date +%Y%m%d_%H%M%S).zip . -x ".git/*" +# zip -r archive_$(date +%Y%m%d_%H%M%S).zip . -x ".git/*" + +# 1단계 상위 디렉토리에서 실행 +tar -czhf ./archive_$(date +%Y%m%d_%H%M%S).tar.gz \ + --exclude=".git" \ + --exclude="public" \ + --exclude=".next" \ + -C ./evcp . + +# .git 경로 제외 압축 +tar -czhf ./archive_$(date +%Y%m%d_%H%M%S).tar.gz --exclude=".git" \-C ./evcp . + +# 전달용 +tar -czhf ./archive_$(date +%Y%m%d_%H%M%S).tar.gz \ + --exclude=".next" \ + --exclude="public/*.zip" \ + -C ./evcp . +``` + +3. 압축 해제 + +```bash +# 원본 구조 그대로 바로 풀기 +tar -xzvf archive_[date].tar.gz + +# 특정 경로에 풀기 +tar -xzvf archive_20240101_123456.tar.gz -C /path/to/directory + +# 압축파일 미리보기 +tar -tzvf archive_20240101_123456.tar.gz + +# 특정 파일만 압축 해제하기 +tar -xzvf archive_20240101_123456.tar.gz path/to/specific/file ``` +- `-x`: 압축 해제 (e**x**tract) +- `-z`: gzip 압축 해제 +- `-v`: 압축 해제 과정 출력 (생략 가능) +- `-f`: 파일 이름 지정 + ## 실행 1. 종속성 설치 `npm i` |
