Rsync 基础配置

rsync 部署/同步

cat /etc/rsyncd.conf

# /etc/rsyncd: configuration file for rsync daemon mode
# See rsyncd.conf man page for more options.
# configuration example:

uid = nobody
gid = nobody
port = 873
use chroot = yes
timeout = 900
ignore nonreadable = yes
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2

max connections = 20
#hosts allow = 10.200.0.0/255.255.0.0
log file = /var/log/rsync.log
transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
lock file = /var/run/rsyncd.lock
pid file = /var/run/rsyncd.pid
#secrets file = /etc/rsyncd/rsyncd.secrets
#motd file = /etc/rsyncd/rsyncd.motd

[indexdata]
path = /indexdata
comment = base data diretory
list = yes
ignore errors
read only = false
transfer logging = yes

  

针对有账号,密码认证的方式,只查看,不同步

【注意点:关于密码文件的权限,必须是 600 ,chmod 600 /tmp/pass ,服务端的制定密码文件也是】

# 需要手动输入用户名和密码
rsync -azv --list-only [email protected]::jeck /indexdata/

# 通过文件方式,避免手动输入用户名和密码
rsync -azv --delete --port 1873 --password-file=/tmp/pass [email protected]::jeck /indexdata/

同步所有文件

rsync -azv --delete [email protected]::jeck /indexdata/

匿名方式
rsync -azv --delete rsync://10.200.0.24/indexdata/jeck /indexdata/

指定端口连接
rsync -azv --delete --port 1873 [email protected]::jeck /indexdata/

cat /etc/rsyncd.conf

# /etc/rsyncd: configuration file for rsync daemon mode
# See rsyncd.conf man page for more options.
# configuration example:
#
# global options
#
#address = 10.200.0.24
uid = nobody
gid = nobody
port = 1873
log file = /var/log/rsync.log
lock file = /var/run/rsyncd.lock
pid file = /var/run/rsyncd.pid
secrets file = /etc/rsyncd/rsyncd.secrets
motd file = /etc/rsyncd/rsyncd.motd

transfer logging = yes
#log format = %t %a %m %f %b
log format = "%o [ %a ] %m (%u) %f %b %l %b"
syslog facility = local3

use chroot = yes
timeout = 900
ignore nonreadable = yes
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2

max connections = 20
#hosts allow = 10.200.0.0/255.255.0.0
timeout = 300

#hosts allow = 10.200.0.56
#hosts deny = 10.200.0.33

[indexdata]
path = /indexdata
comment = base data diretory
list = false
ignore errors
read only = false
transfer logging = yes
#exclude = mac/

[jeck]
path = /indexdata/jeck
comment = jeck data
list = yes
ignore errors
ignore nonreadable
read only = false
transfer logging = yes
auth users = jeck
secrets file = /etc/rsyncd/rsyncd.secrets

[mac]
path = /indexdata/mac
comment = mac data
list = false
ignore errors
ignore nonreadable
read only = false
transfer logging = yes

  

时间: 2024-08-26 12:08:49

Rsync 基础配置的相关文章

linux系统ansible一键完成三大服务器基础配置(剧本)

ansible自动化管理剧本方式一键完成三大服务器基础配置 环境准备:五台服务器:管理机m01:172.16.1.61,两台web服务器172.16.1.7,172.16.1.8,nfs存储服务器172.16.1.31,备份服务器rsync172.16.1.41 要求实现:nfs服务器共享目录/data给两台web服务器 三台服务器可以通过定时任务 备份到备份服务器rsync 实时监控nfs/data目录,并实时备份到备份服务器rsync 开整: 一.配置管理机m01 1.下载基本软件 cd /

Varnish基础配置实现动静分离web站点

由于一个web站点的程序的访问具有局部性特征:时间上的局部性:一个数据被访问过之后,可能很快会被再次访问到:空间局部性:一个数据被访问时,其周边的数据也有可能被访问到;varnish可将这部分数据缓存下来.缓存的数据存在被访问较频繁的数据可以称其为热区:缓存同样存在局部性:时效性:如果缓存空间耗尽:则采用LRU,最近最少使用算法:将过期的缓存清理掉 varnish的基本工作原理: Varnish通过类似于HTPP反向代理的方式将可以用来缓存的数据缓存下来直接响应给客户端的缓存数据,如果缓存中没有

使用Java管理Azure(1):基础配置

Azure针对Java开发人员提供了非常丰富的依赖库,开发工具,和相关插件,让你通过Java对Azure进行服务管理和开发,本文第一步先介绍如何快速的配置Java开发工具,主要针对目前比较流行的Eclipse和Intellij IDEA工具. 本文主要是基础配置的介绍,主要分为以下三个部分: 准备Azure的测试账号 准备Eclipse的Azure开发环境 准备Intellij IDEA的Azure开发环境 ? 准备Azure测试账号 首先你需要有Azure中国的测试账号.你可以通过Azure.

DDNS基础配置

一.简介 DDNS全名Dynamic Domain Name Server,动态域名解析服务.是由DNS和DHCP服务器组合来提供服务,简单来说就是通过DHCP服务器分配的IP地址可以动态更新到DNS服务上,免除了手动指定的麻烦. 二.平台介绍 软件包都用了centos自带源安装的 centos6.4 x64 dhcp-4.1.1-31.P1.el6.x86_64 bind-9.8.2-0.10.rc1.el6.x86_64 三.服务器端配置过程 1.DNS服务器配置 我在之前的文章中已经写过如

          DNS的基础配置

一.DNS简介 1.DNS:Domain Name System(域名系统),是互联网上IP和域名相互解析的分布式层级结构的数据库.DNS的出现能够使用户更好的更加方便的访问互联网,不用记IP地址来访问互联网,可以通过人类更容易记住域名来访问互联网. 2.DNS是一种C/S架构的服务器,客户机用于一个名字对应的地址,而服务器是为客户机提供查询的,查询由两种机制:迭代查询和递归查询 迭代查询:一般是DNS服务器与DNS服务器之间的查询方式 递归查询:一般是客户机与服务器之间的查询方式 3.DNS是

zabbix 基础配置(四)

zabbix 基础配置(四) ============================================================================ 展示接口: ★graph:simple,custom: ★screen: ★slide show: 演示:   把之前定义的同类型的监控项,放在一屏上  1)设定图像的名称,要显示的监控项,颜色等根据自己的需要设定  2)在监测中,选择图形,查看自己定义的graphs,如下:  2.把所有的图像展现为一屏   1)

zabbix基础配置(二)

zabbix基础配置(二) ============================================================================= 概述: ============================================================================= zabbix agent安装配置:  安装配置过程 1.安装 # yum install zabbix-agent-3.0.2-1.el7.x86_64

H3C 交换机的基础配置

1.reset save    删除以前的配置 2.sysname 配置交换机的名字 3.interface 接口  配置IP地址 4.info-center synchronous       日志同步 5.添加用户与密码(指定类型,级别,认证方式) 6.配置aux vty 6.划分vlan 7.将端口添加到vlan中 8.ip http enable 开户web管理 9.ipmacbind IP地址 Mac地址 端口 vlan      IP.MAC.端口.Vlan的邦定命定 10.ip r

Redhat6.5基础配置指南

Redhat6.5基础配置指南 本文针对鄙人在工作中常用系统配置加以说明,通常公司用于生产和测试的服务器基本上都不能连接外网,需要针对刚刚安装好的系统做一系列的常用配置. 一.常用基础系统配置 1.关闭Selinux 1) 使用root用户,输入命令 vi /etc/selinux/config,修改/etc/selinux/config文件,永久性关闭Selinux 2) 修改文件内容,将SELINUX的参数值更改为disabled,点击i键,进入INSERT模式. 3) 点击ESC键,输入