最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Linux下rsync遠(yuǎn)程數(shù)據(jù)同步命令的詳細(xì)介紹

 更新時(shí)間:2017年02月20日 16:50:35   作者:ggjucheng  
rsync是一款開(kāi)源的、快速的、多功能的、可實(shí)現(xiàn)全量及增量的本地或遠(yuǎn)程數(shù)據(jù)同步備份的優(yōu)秀工具。rsync軟件適用于unix/linux/windows等多種操作系統(tǒng)平臺(tái)。下面這篇文章主要介紹了Linux下rsync命令的相關(guān)資料,需要的朋友可以參考借鑒。

介紹

rsync命令是一個(gè)遠(yuǎn)程數(shù)據(jù)同步工具,可通過(guò)LAN/WAN快速同步多臺(tái)主機(jī)間的文件。rsync使用所謂的“rsync算法”來(lái)使本地和遠(yuǎn)程兩個(gè)主機(jī)之間的文件達(dá)到同步,這個(gè)算法只傳送兩個(gè)文件的不同部分,而不是每次都整份傳送,因此速度相當(dāng)快。 rsync是一個(gè)功能非常強(qiáng)大的工具,其命令也有很多功能特色選項(xiàng),我們下面就對(duì)它的選項(xiàng)一一進(jìn)行分析說(shuō)明。

常用場(chǎng)景

無(wú)密碼同步

服務(wù)端:vim /etc/rsyncd.conf

#This is the rsync daemon configuration 

#global settings 
pid file = /var/run/rsyncd.pid
port = 873
lock file = /var/run/rsyncd.lock
log file = /var/log/rsync.log
gid = root
uid = root

#module settings 
[share_data]
path = /web/rsync/share_data
use chroot = no
max connections = 15
read only = yes
write only = no
list = no
ignore errors = yes
timeout = 120
/usr/bin/rsync --daemon
mkdir -p /web/rsync/share_data

客戶端

rsync -avz --progress root@192.168.1.98::share_data /home/hadoop/share_data

限制流量同步

rsync -avz --bwlimit=50 --progress root@192.168.1.98::share_data /home/hadoop/share_data

有密碼同步

服務(wù)端 

vim /etc/rsyncd.conf

#This is the rsync daemon configuration 

#global settings 
pid file = /var/run/rsyncd.pid
port = 873
lock file = /var/run/rsyncd.lock
log file = /var/log/rsync.log
gid = root
uid = root

#module settings 
[auth_data]
path = /web/rsync/auth_data
use chroot = no
max connections = 15
read only = yes
write only = no
list = no
ignore errors = yes
timeout = 120
auth users = hadoop
secrets file = /etc/rsyncd.passwd
echo "hadoop:password123" > /etc/rsyncd.passwd 
chmod 600 /etc/rsyncd.passwd
mkdir -p /web/rsync/auth_data

客戶端

echo "password123" > /home/hadoop/rsyncd.passwd 
chmod 600 /home/hadoop/rsyncd.passwd 
rsync -avz --progress --password-file=/home/hadoop/rsyncd.passwd hadoop@192.168.1.98::auth_data /home/hadoop/auth_data

或者是

export RSYNC_PASSWORD="password123"
rsync -avz --progress hadoop@192.168.1.98::auth_data /home/hadoop/auth_data

寫入同步

服務(wù)端

vim /etc/rsyncd.conf

#global settings 
pid file = /var/run/rsyncd.pid
port = 873
lock file = /var/run/rsyncd.lock
log file = /var/log/rsync.log
gid = root
uid = root

#module settings 
[write_data]
path = /web/rsync/write_data
use chroot = no
max connections = 15
read only = no
list = no
ignore errors = yes
timeout = 120
auth users = hadoop
secrets file = /etc/rsyncd.passwd
mkdir -p /web/rsync/write_data

客戶端

echo "123" > /home/hadoop/write_file
export RSYNC_PASSWORD="password123"
rsync -avz --progress --delete /home/hadoop/write_file hadoop@192.168.1.98::write_data 

限定IP或者網(wǎng)段

#global settings 
pid file = /var/run/rsyncd.pid
port = 873
lock file = /var/run/rsyncd.lock
log file = /var/log/rsync.log
gid = root
uid = root

#module settings 
[write_data]
path = /web/rsync/write_data
use chroot = no
max connections = 15
read only = no
list = no
ignore errors = yes
timeout = 120
auth users = hadoop
secrets file = /etc/rsyncd.passwd
hosts allow = 192.168.2.32 192.168.1.0/24

客戶端 https://download.samba.org/pub/rsync/rsync.html

服務(wù)端 https://download.samba.org/pub/rsync/rsyncd.conf.html 

總結(jié)

以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來(lái)一定的幫助,如果有疑問(wèn)大家可以留言交流。謝謝大家對(duì)腳本之家的支持。

相關(guān)文章

  • Ubuntu下kaldi安裝配置圖文教程

    Ubuntu下kaldi安裝配置圖文教程

    這篇文章主要介紹了Ubuntu下kaldi安裝配置圖文教程,本文圖文并茂給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友參考下吧
    2018-08-08
  • 服務(wù)器端包含、嵌入技術(shù)SSI(Server SideInc lude)詳解

    服務(wù)器端包含、嵌入技術(shù)SSI(Server SideInc lude)詳解

    這篇文章主要介紹了服務(wù)器端包含、嵌入技術(shù)SSI(Server SideInc lude)詳解,本文包含SSI簡(jiǎn)介、SSI的語(yǔ)法、SSI的一些常用命令等,SSI最明顯的特征是網(wǎng)頁(yè)的擴(kuò)展名師.shtml,一些大網(wǎng)站也常用這種技術(shù),需要的朋友可以參考下
    2014-07-07
  • centOS7下Spark安裝配置教程詳解

    centOS7下Spark安裝配置教程詳解

    這篇文章主要介紹了centOS7下Spark安裝配置教程詳解,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2018-07-07
  • Ubuntu 遠(yuǎn)程登陸服務(wù)器 ssh的安裝和配置詳解

    Ubuntu 遠(yuǎn)程登陸服務(wù)器 ssh的安裝和配置詳解

    這篇文章主要介紹了Ubuntu 遠(yuǎn)程登陸服務(wù)器 ssh的安裝和配置詳解,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-06-06
  • Linux面試中最常問(wèn)的10個(gè)問(wèn)題總結(jié)

    Linux面試中最常問(wèn)的10個(gè)問(wèn)題總結(jié)

    這篇文章主要給大家匯總介紹了關(guān)于Linux面試中最常問(wèn)的10個(gè)問(wèn)題,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用Linux系統(tǒng)具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-05-05
  • Ubuntu 下配置Rsync服務(wù)的方法

    Ubuntu 下配置Rsync服務(wù)的方法

    Ubuntu 下配置Rsync服務(wù)的方法,需要的朋友可以參考下。
    2009-09-09
  • CentOS8 安裝 jdk8 / java8的教程(推薦)

    CentOS8 安裝 jdk8 / java8的教程(推薦)

    CentOS8上使用 yum 直接安裝,環(huán)境變量自動(dòng)配置好 ,本文主要給大家介紹 CentOS8 安裝 jdk8 / java8的教程,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友參考下吧
    2019-10-10
  • CentOS 6.5中利用yum搭建LNMP環(huán)境的步驟詳解

    CentOS 6.5中利用yum搭建LNMP環(huán)境的步驟詳解

    這篇文章主要給大家介紹了關(guān)于在CentOS 6.5中利用yum搭建LNMP環(huán)境的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧。
    2017-12-12
  • Linux環(huán)境下安裝JDK1.8

    Linux環(huán)境下安裝JDK1.8

    本文詳細(xì)講解了Linux環(huán)境下安裝JDK1.8的方法,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2021-11-11
  • linux下查看已經(jīng)安裝的jdk 并卸載jdk的方法(推薦)

    linux下查看已經(jīng)安裝的jdk 并卸載jdk的方法(推薦)

    下面小編就為大家?guī)?lái)一篇linux下查看已經(jīng)安裝的jdk 并卸載jdk的方法(推薦)。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2016-11-11

最新評(píng)論

唐河县| 鹤山市| 蒙城县| 修文县| 永德县| 武胜县| 保山市| 伊宁县| 甘德县| 温州市| 比如县| 龙川县| 满城县| 北辰区| 永寿县| 海阳市| 城市| 华蓥市| 耒阳市| 新乡县| 龙岩市| 图片| 屯留县| 宿松县| 紫阳县| 旺苍县| 上饶县| 瓮安县| 松桃| 北票市| 建瓯市| 平湖市| 禄丰县| 清涧县| 锡林浩特市| 闽侯县| 稷山县| 无极县| 佳木斯市| 扶绥县| 莆田市|