Skip to content

월단위 백업인 rsnapshot monthly 가 실행되지 않는 문제 #4

@ibin79

Description

@ibin79

문제

  • /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 ~]# 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions