>> Delete No. 12544 article
No. cron 질문

등록 2000-11-24 19:46:00 By localhost     조회 1
이름 김선희    

		알짜 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)
  제가 보기엔 크론을 실행간거 같긴 한데, 결과물이 없어서여..
어디가 잘못 되었는지 지적해 주시면 감사드리겠습니다.
좋은 하루 되세여..
[관리자] 패스워드를 입력 하십시오. 답장이 존재하면 함께 삭제됩니다.[ 목록 | 이전 ]
패스워드:    

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved