• server端设置

     修改/etc/default/rsync

RSYNC_ENABLE=true

RSYNC_OPTS='--address=10.192.0.5'

RSYNC_NICE=''

  • 修改/etc/rsyncd.conf

# sample rsyncd.conf configuration file

# GLOBAL OPTIONS

#motd file=/etc/motd
uid = nobody
gid = nogroup
use chroot = no
max connections = 10
strict modes = yes

log file=/var/log/rsyncd.log
# for pid file, do not use /var/run/rsync.pid if
# you are going to run rsync out of the init.d script.
# pid file=/var/run/rsyncd.pid
#syslog facility=daemon
#socket options=

# MODULE OPTIONS

[cashare]

comment = CA-Share
    path = /home/cashare
    uid = root
    gid = root
    read only = yes
    hosts allow = 10.192.0.0/24
    list = false
    ignore erros
    auth users = backup
    secrets file = /etc/rsync.pass
    transfer logging = yes
    log format = %t: host %h (%a) %o %f (%l bytes). Total %b bytes.

基本上配置还是比较好理解的了。

创建/etc/rsync.pass

chmod 600 /etc/rsync.pass

echo ‘backup:backup’ > /etc/rsync.pass

  • 客户端配置:

命令格式:

/usr/bin/rsync -vzrtopg --delete --progress backup@10.192.0.5::cashare /backup-10.192.0.5 --password-file=/etc/rsync.pass

写入到crontab

cat /etc/rsync.pass

backup

  • 犯得错误:

rsync: failed to connect to 192.168.1.106: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.6]

应该和下面原因相同

root@InnerServer3:/etc# rsync -vzrtopg --delete --progress gitlab@10.192.0.5:gitlab /backup-10.192.0.5/
gitlab@10.192.0.5's password:
Permission denied, please try again

ip之后应该是::而不是:,疏忽啊

@ERROR: auth failed on module gitlab
rsync error: error starting client-server protocol (code 5) at main.c(1534) [Receiver=3.0.8]

在client的密码文件中,只保存密码。

[rsync]rsync设定及错误处理的更多相关文章

  1. Linux-非结构化数据同步-Linux下Rsync+Rsync实现非结构化增量差异数据的同步2

    说明: 操作系统:CentOS 5.X 源服务器:192.168.21.129 目标服务器:192.168.21.127,192.168.21.128 目的:把源服务器上/home/www.osyun ...

  2. [rsync]——rsync文件同步和备份

    实验环境 (1) Rsync服务器:10.0.10.158 (2) Rsync客户端:10.0.10.173 Rsync服务器端的配置 1. 安装xinetd和rsync # yum install ...

  3. [daily][archlinux][rsync] rsync

    科普文档:https://wiki.archlinux.org/index.php/Rsync 之前改文件系统时,用过. 然而用的不太对,导致一部分文件的权限出了问题. [troubleshoot][ ...

  4. centos linux 系统日常管理4 scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法 第十七节课

    centos linux 系统日常管理4  scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法  第十七节课 rsync可以增量同步,scp不行 ...

  5. Linux下rsync daemon模式下的错误汇总

    一.前言:最近学习服务环境搭建,遇到了许多大大小小的问题,不过还好,经过我的一通努力终于都解决了,所以分享出来给自己留个纪念,同时也希望能帮助学习中的朋友. 二.环境:两台服务器环境相同 1 [roo ...

  6. rsync常见错误

    rsync使用时的常见问题: 错误1: rsync: read error: Connection reset by peer (104) rsync error: error in rsync pr ...

  7. rsync错误

    rsync error:No route to host rsync服务端开启的iptables防火墙 [root@nfs01 tmp]# rsync -avz /etc/hosts rsync_ba ...

  8. 【集群实战】Rsync常见错误总结

    1. 服务端指定模块没有对应目录 报错详情: @ERROR: chdir failed rsync error: error startingclient-server protocol (code ...

  9. 配置rsync服务,数据同步。

    这部分设计服务器端和客户端. [服务器端] 如果服务器没有安装rsync服务则使用yum安装rsync服务. yum install rsync 然后 vim /etc/xinetd.d/rsync ...

随机推荐

  1. Python字符串所有操作函数

    name = "my \tname is {name} and i am {year} old" print(name.capitalize())#首字母大写 print(name ...

  2. 我的linux操作习惯

    标签(空格分隔): ubuntu 最佳操作 用linux随时可能会有宕机的危险,谁知道我哪会神经病犯了呢.用deepin宕机的可能性会更高的,所以我才不得不安装一个windows做备份,然后把数据备份 ...

  3. leetcode个人题解——#22 Generate Parentheses

    思路: 递归解决,如果左括号个数小于右括号或者左括号数小于总括号对数,则生成一个左括号,如果左括号数大于右括号,生成一个右括号. class Solution { public: vector< ...

  4. POJ 2540 Hotter Colder(半平面交)

    Description The children's game Hotter Colder is played as follows. Player A leaves the room while p ...

  5. nginx虚拟目录实现两个后台使用

    购买了阿里云机器,准备搭建一套备份的后台,由于资源有限所以将两个后台搭建到一组SLB下的两台WEB上. 使用软件:NGINX+PHP root@xx conf.d]# yum install php- ...

  6. 软件管理——rpm&dpkg、yum&apt-get

    一般来说著名的linux系统基本上分两大类: 1. RedHat系列:Redhat.Centos.Fedora等 2. Debian系列:Debian.Ubuntu等 一.RedHat 系列     ...

  7. Debian 7 amd64--TP-LINK TL-WN725N 2.0源码驱动编译安装

    租房用的是无线网络,在新安装的Debian 7 amd64使用的无线网卡型号是TP-LINK TL-WN725N 2.0,发现驱动安装还是有些问题,折腾了很久,特意在此记录一下. TL-WN725N ...

  8. Dom的样式操作和属性操作

    如果说web的研究对象是html和css,那么整个dom结构,包含html树和dom树的dom结构才是研究对象,而在整个页面呈现上面,js起到的作用则是异步的用户行为. 按照上面整个思路,获取dom元 ...

  9. oracle怎样查询索引的使用情况

    查询用户的索引select index_name,table_name,tablespace_name, index_type,uniqueness , status from dba_indexes ...

  10. vector中数据进行去重和排序

    , , , , , , ,}; std::vector<int> vec(a, a+sizeof(a)/sizeof(int) ); std::sort(vec.begin(), vec. ...