-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
Description
문제
-
/backup/.snapshots/monthly.0/백업이 존재하지 않음. -
1개월이 지난 백업을 최근 3개월간 보관하는 월단위 백업의 누락.
-
grep monthly /var/log/cron크론 데몬에서 월단위 백업의 실행 기록 조차 없음.
원인
-
백업 스케쥴 등록 설정 파일의 마지막 라인의 공백이 없어, 크론 데몬에서 인식되지 않던 현상임.
-
문제가 있는 설정 확인
# tail -n2 /etc/cron.d/php79-rsnapshot
5 3 * * 1 root /usr/bin/rsnapshot weekly
5 2 1 * * root /usr/bin/rsnapshot monthly[root@localhost ~]# monthly 뒤에 빈 라인없이 바로 붙어 나옴.
기존 사용자 해결 방법
- 이미 php79 backup 을 사용중인 기존 사용자는
/etc/cron.d/php79-rsnapshot파일 마지막에 빈라인만 추가하면, 다음 매달 1일부턴 월단위 백업이 정상적으로 이루어지게 됨.
echo '' >> /etc/cron.d/php79-rsnapshot- 정상적인 설정 확인
# tail -n2 /etc/cron.d/php79-rsnapshot
5 3 * * 1 root /usr/bin/rsnapshot weekly
5 2 1 * * root /usr/bin/rsnapshot monthly
[root@localhost ~]# Reactions are currently unavailable