백업 스크립트 #### rsync 백업 > LINUX

본문 바로가기
사이트 내 전체검색

LINUX

백업 스크립트 #### rsync 백업

페이지 정보

profile_image
작성자 최고관리자
댓글 0건 조회 5,547회 작성일 21-02-10 16:59

본문

#### rsync 백업

-----> 원본 컴터 <-----
 --> /etc/rsyncd.conf
 [rsync_name]
 path = /home/ 
 comment = home
 uid = root
 gid = root
 use chroot = yes
 read only = yes
 hosts allow = 동기화시킬컴퓨터 IP
 max connections = 1


 -----> 동기화 컴터 <-----
 --> /etc/cron.daily/backup.sh
 #!/bin/sh

 rdate -s time.bora.net

 DATE=`date +%Y%m%d`

 rsync -auvz "원본컴터 IP"::rsync_name "현제의컴퓨터에서 동기화시킬디렉토리"
ex : rsync -auvz 192.168.0.1::rsync_name /home/

 #### rsync 에러 종류

write failed on BackUpData/localhost_public_html3/Dealer/image/program/pcanywhere10.zip : Success
 rsync error: error in file IO (code 11) at receiver.c(243)                                   
 rsync: connection unexpectedly closed (2034656 bytes read so far)                           
 rsync error: error in rsync protocol data stream (code 12) at io.c(150)     
 ------------------> 용량이 다 차서 더이상 백업을 받지 못함.               

 [root@localhostroot]# rsync -avz 211.224.128.142::photo /home1/photo/photo/
 rsync: server sent "" rather than greeting
 rsync error: error starting client-server protocol (code 5) at main.c(924)
 ------------------> 방화벽 점검... xinit에서 실행하므로 /etc/hosts.allow  /etc/hosts.deny 점검..

 [root@localhostroot]# rsync -avz 211.224.128.142::photo /home1/photo/photo/
 rsync: failed to connect to 211.224.128.142: Connection refused
 rsync error: error in socket IO (code 10) at clientserver.c(97)
 ------------------> 방화벽에 설정확인

rsync: read error: Connection reset by peer (104)
 rsync error: error in rsync protocol data stream (code 12) at io.c(515)
 ------------------>  데몬이 돌아가는지 또는 방화벽에 설정확인(hosts.allow)

 @ERROR: chroot failed
 rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
 rsync error: error in rsync protocol data stream (code 12) at io.c(420)
 ------------------>  해당디렉토리에 접근권한 확인,또는 경로가 잘못된 경우


#### 압축 백업 후 3일 보관
tar cvf /BackUp/$DATE.home.tar /home/*
 find /BackUp/* -ctime +3 -exec rm -f {} \;

 #### 카피 백업
cp -Ruf /home/* /BackUp2/

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

  • 게시물이 없습니다.

접속자집계

오늘
3,181
어제
4,221
최대
6,642
전체
1,012,129
contact : webmaster@beautipia.co.kr
Copyright © beautipia.co.kr. All rights reserved.