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

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

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

介紹

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

常用場景

無密碼同步

服務(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é)

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

相關(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簡介、SSI的語法、SSI的一些常用命令等,SSI最明顯的特征是網(wǎng)頁的擴(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面試中最常問的10個(gè)問題總結(jié)

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

    這篇文章主要給大家匯總介紹了關(guān)于Linux面試中最常問的10個(gè)問題,文中通過示例代碼介紹的非常詳細(xì),對大家學(xué)習(xí)或者使用Linux系統(tǒng)具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來一起學(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)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧。
    2017-12-12
  • Linux環(huán)境下安裝JDK1.8

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

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

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

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

最新評論

大城县| 应用必备| 治多县| 花垣县| 和政县| 柳河县| 新泰市| 巫山县| 永福县| 潜江市| 西昌市| 开平市| 遂川县| 达孜县| 广州市| 章丘市| 新余市| 夏津县| 襄汾县| 梁河县| 南丹县| 额尔古纳市| 昌宁县| 佛冈县| 鲁山县| 襄汾县| 北海市| 大城县| 岑溪市| 科技| 舟曲县| 唐河县| 南投县| 凤凰县| 海兴县| 施秉县| 潜山县| 香格里拉县| 偃师市| 天水市| 天长市|