From 95bbe9c583ff841220da1267630e7b2025fc36dc Mon Sep 17 00:00:00 2001 From: dujinkim Date: Thu, 19 Jun 2025 09:44:28 +0000 Subject: (대표님) 20250619 1844 KST 작업사항 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index e6d2848c..8b87e2f2 100644 --- a/README.md +++ b/README.md @@ -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` -- cgit v1.2.3