| 353 번 글: cron 질문 |
| 글쓴이: 김선희
|
글쓴날: 2000년 11월 25일 09:00:39 토(오전) |
조회: 1411 |
알짜 6.2, 오라클 816EE를 사용하고 있습니다.
웹페이지와 오라클 DB를 백업하려고 크론에 등록했는데, 잘
안돼서 문의 드립니다.
먼저 제가 작업한 내역을 차례대로 적어볼께요.
1. 웹페이지를 압축하는 스크립트 파일 생성
<< web_back.sh >>
#!/bin/sh
file_name=`date+%Y%m%d`
source_dir=/home/apache/htdocs
record_dir=/home/apache
if [ ! -d $record_dir ]; then
mkdir $record_dir
fi
tar cvfz $record_dir/$file_name.tgz $source_dir
2. 소유권 및 모드를 변경하고 크론 폴더에 저장
# chown root.root web_back.sh
# chmod u+x web_back.sh
# cp web_back.sh /etc/cron.daily
3. 크론 테이블 시간을 다음과 같이 변경
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 12 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
4. 크론 데몬 재시작
#/etc/rc.d/init.d/crond restart
5. 점심 먹구 와서 로그파일을 확인했더니 아래와 같습니다.
root (11/24-11:45:10-10335) LIST (root)
CRON (11/24-11:45:59-10366) STARTUP (fork ok)
root (11/24-11:50:00-10371) CMD ( /sbin/rmmod -as)
*system* (11/24-11:52:00-10366) RELOAD (/etc/crontab)
CRON (11/24-11:52:29-10404) STARTUP (fork ok)
root (11/24-12:00:01-10409) CMD ( /sbin/rmmod -as)
root (11/24-12:01:00-10417) CMD (run-parts /etc/cron.hourly)
root (11/24-12:02:00-10419) CMD (run-parts /etc/cron.daily)
root (11/24-12:10:00-10582) CMD ( /sbin/rmmod -as)
제가 보기엔 크론을 실행간거 같긴 한데, 결과물이 없어서여..
어디가 잘못 되었는지 지적해 주시면 감사드리겠습니다.
좋은 하루 되세여..
|
이전글 : Re: 이런 에러가 나오네요, 가르쳐주세요
다음글 : Re: cron 질문
|
from 210.120.25.98
JS(Redhands)Board 0.4 +@
|
|