리눅스 분류
백업 스크립터 문의
작성자 정보
- 작은또치 작성
- 작성일
컨텐츠 정보
- 1,683 조회
- 0 추천
- 목록
본문
안녕 하세요. 백업 스크립터 입니다. --exclude 확장자로 제외 했지만, 제외 되지 않아요 소스에 문제가 있는지 알려 주세요.
방법좀 알려 주세요. #!/bin/sh home_root="/home/" backup_home_root="/backup/home/" cd $home_root echo "------------>" for home_name in $(ls) do if [ -d "$home_root/$home_name" ] ; then echo "tar -cvzf $backup_home_root$home_name-$(date +%Y%m%d).tar.gz $home_name --exclude *.zip --exclude *.exe --exclude *.wma --exclude *.mov --exclude *.asf --exclude *.mp3" tar -czf "$backup_home_root$home_name-$(date +%Y%m% d).tar.gz" "$home_name" fi done find /backup/home -ctime +2 -exec rm -f {} ;
관련자료
-
이전
-
다음
댓글 0
등록된 댓글이 없습니다.