개요

rsnapshot 은 rsync 기반의 remote snapshot 툴이다.

다음과 같은 기능이 있다.

  • Filesystem snapshot - for local or remote systems.
  • Database backup - MySQL backup
  • Secure - Traffic between remote backup server is always encrypted using openssh
  • Full backup - plus incrementals
  • Easy to restore - Files can restored by the users who own them, without the root user getting involved.
  • Automated backup - Runs in background via cron.
  • Bandwidth friendly - rsync used to save bandwidth

 

테스트 환경

다음과 같은 환경에서 snapshot 을 관리한다고 가정하자.

  • snapshot.myhost.com : CentOS snapshot 서버
  • Issue Tracker :  CentOS 와 JIRA 가 구동되는 issue tracking system. 백업 대상
  • www.myhost.com : Redhat 과 apache 로 구동중인 웹서버 백업 대상
  • mysql.myhost.com : CentOS 와 mysql 서버

설치 & 설정

설치

Redhat package 에 rsnapshot 이 설치되어 있지 않으므로 yum 으로 설치 못하고 별도로 해야 한다.

  1. snapshot.myhost.com 에 로그인
  2. 패키지 다운로드

    패키지 다운로드

    cd /tmp
    curl -C - -O http://www.rsnapshot.org/downloads/rsnapshot-1.3.1-1.noarch.rpm
    curl -C - -O http://www.rsnapshot.org/downloads/rsnapshot-1.3.1-1.noarch.rpm.sha1
    BASH
  3. rpm package verify

    sha 검증

    sha1sum -c rsnapshot-1.3.1-1.noarch.rpm.sha1
        rsnapshot-1.3.1-1.noarch.rpm: 성공
    BASH
  4. package 설치

    rpm -ivh rsnapshot-1.3.1-1.noarch.rpm
    BASH

설정

rsnapshot 설정시 주의

  1. 설정 파일의 elements 는 tab 으로 구분된다.
  2. 모든 디렉토리는 / 로 끝나야 한다. /home/ 은 맞는 구문이지만 /home 은 에러가 발생한다.
  1. rsnapshot 설정

     vi /etc/rsnapshot.conf
    CODE
  2. 22

참조 자료