Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ibin79 opened this Issue Nov 5, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@ibin79
Copy link
Collaborator

ibin79 commented Nov 5, 2016

문제

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

@ibin79 ibin79 added the bug label Nov 5, 2016

@ibin79 ibin79 changed the title 1개월이 지난 백업의 rsnapshot monthly 가 실행되지 않는 문제 rsnapshot monthly 가 실행되지 않는 문제 Nov 5, 2016

@ibin79 ibin79 changed the title rsnapshot monthly 가 실행되지 않는 문제 월단위 백업인 rsnapshot monthly 가 실행되지 않는 문제 Nov 5, 2016

@ibin79 ibin79 closed this Nov 5, 2016

@ibin79

This comment has been minimized.

Copy link
Collaborator Author

ibin79 commented Nov 5, 2016

문제 케이스) 월 단위 백업(monthly) 없음

# ls -lt /backup/.snapshots/
total 48
drwxr-xr-x. 3 root root 4096 Nov  4 01:05 daily.0
drwxr-xr-x. 3 root root 4096 Nov  3 01:05 daily.1
drwxr-xr-x. 3 root root 4096 Nov  2 01:05 daily.2
drwxr-xr-x. 3 root root 4096 Nov  1 01:05 daily.3
drwxr-xr-x. 3 root root 4096 Oct 31 01:05 daily.4
drwxr-xr-x. 3 root root 4096 Oct 30 01:05 daily.5
drwxr-xr-x. 3 root root 4096 Oct 29 01:05 daily.6
drwxr-xr-x. 3 root root 4096 Oct 24 01:05 weekly.0
drwxr-xr-x. 3 root root 4096 Oct 17 01:05 weekly.1
drwxr-xr-x. 3 root root 4096 Oct 10 01:05 weekly.2
drwxr-xr-x. 3 root root 4096 Oct  3 01:05 weekly.3

정상 케이스) 월 단위 백업(monthly) 존재

# ls -lt /backup/.snapshots/
합계 56
drwxr-xr-x. 3 root root 4096 2016-11-05 02:30 daily.0
drwxr-xr-x. 3 root root 4096 2016-11-04 02:30 daily.1
drwxr-xr-x. 3 root root 4096 2016-11-03 02:30 daily.2
drwxr-xr-x. 3 root root 4096 2016-11-02 02:30 daily.3
drwxr-xr-x. 3 root root 4096 2016-11-01 02:30 daily.4
drwxr-xr-x. 3 root root 4096 2016-10-31 02:30 daily.5
drwxr-xr-x. 3 root root 4096 2016-10-30 02:30 daily.6
drwxr-xr-x. 3 root root 4096 2016-10-24 02:30 weekly.0
drwxr-xr-x. 3 root root 4096 2016-10-17 02:30 weekly.1
drwxr-xr-x. 3 root root 4096 2016-10-10 02:30 weekly.2
drwxr-xr-x. 3 root root 4096 2016-10-03 02:30 monthly.0
drwxr-xr-x. 3 root root 4096 2016-08-29 02:30 monthly.1
drwxr-xr-x. 3 root root 4096 2016-08-01 02:30 monthly.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.