Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

로컬 풀백업 - 디렉토리 지정 외 #1

Open
open2 opened this issue Nov 24, 2015 · 3 comments
Open

로컬 풀백업 - 디렉토리 지정 외 #1

open2 opened this issue Nov 24, 2015 · 3 comments
Milestone

Comments

@open2
Copy link

open2 commented Nov 24, 2015

로컬 풀 백업 기능에서 개선 요청 드립니다.

  1. 디렉토리 지정
    서버에 따라서 백업 받고 싶은 데이터가 /home 이외의 위치에 있는 경우가 있습니다.
    로컬 풀 백업 디렉토리를 지정할 수 있게 설정영역으로 올려 주셨으면 합니다.
  2. home 디렉토리에서 제외할 디렉토리 지정
    어떤 디렉토리는 테스트 목적이고 용량만 커서 제외하고 싶은 경우가 있습니다.
    exclude='test12,test4' 이런 식으로 해서 제외할 것을 지정할 수 있으면 합니다.

좋은 솔루션에 감사드립니다^^

@ibin79 ibin79 added this to the 1.1 milestone Nov 24, 2015
@ibin79
Copy link
Collaborator

ibin79 commented Nov 24, 2015

첫 이슈 감사드립니다. :)

깔끔하게 설정 영역으로 2가지 사항을 뺄 수 있도록, 다음 버전에서 개선해 보겠습니다.

  1. 백업 대상은 대략 다음 설정 정도로 구상중입니다.
BACKUP_TARGETS='/home /disk2'    # 백업 대상 디렉토리.  2개 이상 디렉토리는 공백으로 구분.

# 문제점: /home 은 계정 단위 백업을 위해 하위 디렉토리만 백업하는데, 
#   /disk2 디렉토리 안의 데이타까지 백업해야 한다면 문제됨...
#   하위 디렉토리 백업 + --no-recursion 백업 으로 해결...?
  1. 제외할 파일은 늘어날 수 있는 점은 감안하면, tar 의 --exclude-from 옵션으로 제외할 파일 목록으로 구상중입니다.
# 백업시 제외할 디렉토리/파일 목록 파일.  2개 이상 목록 파일은 공백으로 구분.
#BACKUP_EXCLUDE_LISTS='/root/php79-backup-exclude.txt /root/php79-backup-over-10mb.txt'

@open2
Copy link
Author

open2 commented Nov 25, 2015

/home을 전체로 백업 받는데,
/home/test/public_html/data는 제외하는 것이 가능할까요?

매일 소스만 풀백업 받기를 원하는 경우도 있을거 같아요.
data는 disk full이라서 제외하구요.

좋은 소스 덕분에 어제 full backup 돌렸습니다^^

@ibin79
Copy link
Collaborator

ibin79 commented Nov 25, 2015

현재 스크립트에서도 다음처럼 직접 --exclude-from 옵션을 추가하시면 가능합니다.

#tar zcf $BACKUP_PREFIX.$FN.$_home.Php79Backup.tgz /home/$_home \
tar zcf $BACKUP_PREFIX.$FN.$_home.Php79Backup.tgz --exclude-from=/root/php79-backup-exclude.txt /home/$_home \

/root/php79-backup-exclude.txt 파일 내용은 다음처럼 전체 경로를 입력해주시면 됩니다.

/home/test/public_html/data
/home/test2/public_html/data
/home/test3/public_html/phpinfo.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants