•  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

  • 最佳开源电子邮件服务器
  • 前6工具搜索对于内存在Linux下
  • Whitelisting Edge Server IPs
  • The Ultimate Gaming Experience with Psychz Networks Game Servers!
  • Taiwan Dedicated Server
  • SSH permission denied publickey
  • Reference Architecture (Active-Passive Configuration)
  • Path
  • NFT Domains - A new generation of domains
  • Japan Dedicated Server
  • How to setup dedicated server for web hosting?
  • How to setup a dedicated server for GMOD (Garry's Mod)
  • Holland Dedicated Server
  • DDoS攻击仍然有上升的趋势
  • Create TXT record
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