사용자 도구

사이트 도구


linux:tar

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
마지막 판 양쪽 다음 판
linux:tar [2020/10/29 11:03]
kwon37xi [부모 경로 제외하기]
linux:tar [2020/10/29 12:33]
kwon37xi
줄 41: 줄 41:
   * [[https://help.ubuntu.com/community/BackupYourSystem/TAR|BackupYourSystem/TAR]]   * [[https://help.ubuntu.com/community/BackupYourSystem/TAR|BackupYourSystem/TAR]]
 <code sh> <code sh>
-cd <원하는디렉토리> +tar -cvpzf backup.tar.gz \ 
- +  --exclude=/backup.tar.gz \ 
-tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --one-file-system / +  --one-file-system \ 
 +  -C <원하는디렉토리> . 
 +</code> 
 +  * ''%%--one-file-system%%'' : 동일 파티션내의 데이터만, (link 로 다른데로 걸려있는 것들 제외) 
 +  * ''$HOME'' 기준으로 여러 디렉토리 백업하기 
 +<code sh> 
 +# "vivaldi default profile 에서 "Service Workder"는 캐시 역할이라서 제외하고 백업 
 +cd ~ 
 +tar cvpzf /tmp/home-backups.tar.gz --one-file-system 
 +  --exclude="Service Worker"
 +  .config/JetBrains \ 
 +  .local/share/JetBrains/ .config/vivaldi/Default
  
 +# 복원
 +cd ~
 +tar xvzf /tmp/home-backups.tar.gz
 </code> </code>
- 
 ===== 참조 ===== ===== 참조 =====
   * [[https://www.tecmint.com/18-tar-command-examples-in-linux/|18 Tar Command Examples in Linux]]   * [[https://www.tecmint.com/18-tar-command-examples-in-linux/|18 Tar Command Examples in Linux]]
  
linux/tar.txt · 마지막으로 수정됨: 2022/07/24 11:01 저자 kwon37xi