•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

Rsync兩個目錄

  • Home
  • Client
  • Qa Forum
  • Rsync兩個目錄

Posted By: ling | 1 Replies | Last Reply On: Jul 11, 2017 02:04:28

如何rsync兩個目錄?

Psychz - Manish

Votes: 0Posted On: Jul 11, 2017 02:04:28
 

“rsync”是Linux發行版提供的多功能複制工具。它用於通過任何遠程shell將文件本地複製到遠程主機。在備份和鏡像的情況下,rsync最適合同步文件。通過將敏感數據複製到遠程主機並在需要時進行檢索,可以保護數據的安全。它還包含可以執行操作的選項。 “rsync”命令通過添加要復制的新文件來更新文件夾,並避免覆蓋文件。


先決條件

應該在系統上安裝“rsync”。要檢查是否安裝了rsync,請運行以下命令。


rsync --version

2.如果未安裝rsync命令,請通過運行以下命令進行安裝。


基於RPM的操作系統 - yum -y安裝rsync
Debian / Ubuntu - apt-get install rsync

3.確保遠程和本地系統的防火牆上的IP被列入白名單。

4.遠程和本地機器之間建立的SSH連接。


推動操作

將文件從本地複製到遠程系統稱為“推送”操作。命令的語法如下。

rsync -a path_of_local_directory username @ remote_host:destination_directory


拉動作

將文件從遠程文件複製到本地機器稱為拉動操作。命令的語法如下。

rsync -a username @ remote_host:path_of_remote_directory place_to_sync_on_local_machine


“rsync”命令有很多選項可供使用。下面討論一些重要的選擇。

#“-a”選項與-rlptgoD相同。以下是“-a”選項執行的一些功能。

1.遞歸到所有目錄(-r),
2.copy符號鏈接作為符號鏈接(-l),
3.保留文件權限(-p),
4.保留修改時間(-t),
保留組(-g),
6.保留文件所有權(-o)和
7.將設備保留為設備(-D)。

#“-z”選項用於在發送文件時壓縮文件。

#“-P”選項與--partial和--progress相同。

- 部分 - 用於恢復中斷的傳輸。
--progress - 用於顯示傳輸的進度條。

#“-v” - 用於以更詳細的方式顯示結果。

“rsync”命令帶有許多選項。建議使用rsync的“man”命令來掌握所有選項。命令如下。

男人rsync

Was this reply helpful?

Related topics

  • 窗口正在關閉在Windows Server 2003
  • 熱門實用功能Linux Mint的
  • sObject - Configuring CORS and Bucket Policies Using S3 Browser
  • The Role of CDN/DNS in Disaster Recovery Planning
  • Psychz Networks Expands to Atlanta: New Data Center Location Now Available
  • Private Network - Create
  • Multi-Factor Authentication - Enable
  • Mirai Botnet Co-Authors Plead Guilty on Two Charges
  • Live Statistics
  • How to use anycast?
  • How to clone one drive to another?
  • Dedicated Server Provider In India
  • Cloud Storage Systems For Business
  • CDN Domains Intro
  • Benefits of Colocation Services
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801