매일(혹은 매주) 일정한 시간에 특정 스크립트를 실행하기

oosap의 이미지

제가 미디어 위키를 설치했습니다.
그리고 그 백업 스크립트도 준비했습니다.
백업 스크립트는 실행이 되면 위키 데이타베이스와 파일시스템을 백업해서 정해진 디렉토리로 복사합니다.

1. 이제 마무리로 추가하여야 하는 것은 이 백업 작업이 매일 새벽 시간에 자동으로 실행하도록 설정하는 것입니다.

2. 그리고 더 발전적인 바람은 백업으로 복사된 파일이 리모트 PC 로 복사되도록 하는 기능도 추가하고 싶습니다. 이를 위해서는 리모트 PC 에서 원격 접속을 하고 백업스크립트를 실행하고 백업된 압축파일을 복사해오는 것까지를 새로운 스크립트로 만들어야 하는지... 이부분 의 조언을 구합니다. 일반적으로 백업을 할 때 이렇게 리모트 PC로 사본을 복사하는 것까지 하지는 않는지 궁금합니다.

우분투 11.10 입니다.

oosap의 이미지

crond 이군요..
직접찾으니까 금방 나오네요..
찾아보지도 않고 질문부터 올렸다가 퇴근을 미루고 찾아보니 있군요...
글 삭제가 안되는 관계로 빈글로 두는 것보다는 자답을 해둡니다.

감사합니다.

Thanks for being one of those who care for people and mankind.
I'd like to be one of those as well.

qiiiiiiiip의 이미지


1. crontab
2. rsnapshot

oosap의 이미지

저의 자답이 2번에 대해서는 없었군요.
알려주신 것 확인해보겠습니다.
감사합니다.
이번기회에 파이썬도 좀 공부해봐야겠습니다.

Thanks for being one of those who care for people and mankind.
I'd like to be one of those as well.

planetarium의 이미지

rsnapshot에 추천 한표 더합니다.

백업을 마지막 한개의 카피만 한군데나 여러군데 가지고 있어서는 복구 불가능한 경우가 생길수 있습니다.
rsnapshot을 이용하면 rsync와 hardlink copy, cron을 조합해서 몇시간전, 며칠전, 몇주전, 몇달전으로 복사 한번에 돌아가도록 세팅할 수 있습니다.
백업 시점도 자유롭게 선택할수 있구요. 맥의 타임머신 기능이라고 보시면 됩니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.