您好,欢迎来到微智科技网。
搜索
您的当前位置:首页RSYNC精装版

RSYNC精装版

来源:微智科技网

RSYNC 安装需要注意的:

yum -y install xinetd

vi /etc/xinetd.d/rsync

disable = no

service xinetd restart

http:///ak_2005/article/details/3768552
http://www.cnblogs.com/itech/archive/2009/08/10/1542945.html


error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory

解决办法如下:

1.在/etc/ld.so.conf中加一行/usr/local/lib,


ldconfig
即可

RSYNC主配置文件:

如果没有/etc/rsync.conf 要自己手动建立


RSYNC主配置文件:

[root@carschina ~]# cat /etc/rsync
rsyncd.conf     rsyncd.motd     rsyncd.secrets  rsync.pass      
[root@carschina ~]# cat /etc/rsyncd.conf
secrets file = /etc/rsyncd.secrets
motd file = /etc/rsyncd.motd
read only = yes
list = yes
uid = root
gid = wheel

hosts allow = 127.0.0.1 184.171.168.58 218.85.133.184 61.187.235.117 115.238.73.233 61.160.210.41 219.129.216.248  222.76.215.108

max connections = 24
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
timeout = 300

################################################

[web_all]
path = /data/backup/all_web
auth users = rsy_user

[svn_clubcar]
path = /data/svn/svn_clubcar/files/svn_clubcar
auth users = rsy_user
read only = no

[530la]
path = /data/web/530la
read only = no
auth users = rsy_user   #######系统真实用户

################################################
[carschina.com]
path = /data2/web/carschina.com
auth users = rsy_user

#######################################################
[our_cc]
path = /data2/web/ourcarschinacom
auth users = rsy_user
######################################djbzmz 2010-02-04 ZhuZhan 4 ge#############
[yiqiwangcom]
path = /data2/web/yiqiwangcom
auth users = rsy_user

[nflyw.com]
path = /data/web/nflyw.com
auth users = rsy_user

###########################################djbzmz 2010-02-07 BeiFenZhan 1 ge##################################
[zhiweicom]
path = /data/web/zhiweicom
auth users = rsy_user

########################################################################################################



[53dhcom]
path = /data/web/53dhcom
auth users = rsy_user



/usr/local/rsync/bin/rsync --daemon   启动rsync


RSYNC自动化配置:

5 1 * * * /data/sh/rsy/rsy_www.zhaoqipei.com_from_218.85.133.175_to_local.sh >> /data/logs/rsy/rsy_www.zhaoqipei.com_from_218.85.133.175_to_local.log 2>&1

作为备份服务器:184用rsync将其他网站数据同步过来:执行此脚本(当然,可以用一个计划时间来设置什么时候需要备份):

[root@localhost /data/sh/rsy]# ./rsy_baozhicom_from_216.108.232.205_to_local.sh  

15 9 * * * /data/sh/rsy/rsy_baozhicom_from_216.108.232.205_to_local.sh      >>/data/logs/rsy/rsy_baozhicom_from_216.108.232.205_to_local.log 2>&1

baozhicom所同步过来的数据库:

[root@localhost /data/web/baozhicom/db]# ls
2011-12-13  2011-12-15  baozhicom_2011-12-13.tar.bz2  baozhicom_2011-12-14.tar.bz2  baozhicom_2011-12-15.tar.bz2  

使用mysqlhotcopy需要安装 perl-DBD-mysql
如导出数据库:[root@localhost ~]# mysqlhotcopy -u root -p YvAcKEY1XtP9vFOxkulP(密码) xapp /data/web/xapp.im/db




因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 7swz.com 版权所有 赣ICP备2024042798号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务