•  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 ใช้สำหรับคัดลอกไฟล์จาก / ไปยังโฮสต์ระยะไกลผ่านทางรีโมตคอนโทรลใด ๆ rsync ใช้ดีที่สุดสำหรับการซิงโครไนซ์ไฟล์ในกรณีที่มีการสำรองและทำมิเรอร์ คุณสามารถเก็บรักษาข้อมูลของคุณให้ปลอดภัยโดยการคัดลอกข้อมูลสำคัญไปยังโฮสต์ระยะไกลและเรียกค้นข้อมูลเมื่อจำเป็น นอกจากนี้ยังมีตัวเลือกที่คุณสามารถดำเนินการได้ คำสั่ง "rsync" จะอัพเดตโฟลเดอร์โดยการเพิ่มไฟล์ใหม่ที่จะคัดลอกและหลีกเลี่ยงการเขียนทับไฟล์


ข้อกำหนดเบื้องต้น

1. ควรติดตั้ง "rsync" ในระบบของคุณ หากต้องการตรวจสอบว่ามีการติดตั้ง rsync หรือไม่ให้รันคำสั่งต่อไปนี้


rsync - เวอร์ชัน

2. หากไม่ได้ติดตั้งคำสั่ง rsync ให้ติดตั้งโดยรันคำสั่งต่อไปนี้


ระบบปฏิบัติการ RPM - yum -y ติดตั้ง rsync
Debian / Ubuntu - apt-get ติดตั้ง rsync

3. ตรวจสอบให้แน่ใจว่า IP ได้รับการอนุญาตให้ใช้งานบนไฟร์วอลล์ทั้งระบบระยะไกลและในระบบภายใน

4. การเชื่อมต่อแบบ SSH ระหว่างเครื่องระยะไกลและเครื่องท้องถิ่น


การทำงานแบบ Push

การคัดลอกไฟล์จากระบบภายในไปยังระบบระยะไกลเรียกว่าการดำเนินการ "push" ไวยากรณ์ของคำสั่งมีดังนี้

rsync -a path_of_local_directory ชื่อผู้ใช้ @ remote_host: destination_directory


การดำเนินการดึงข้อมูล

การคัดลอกแฟ้มจากระยะไกลไปยังเครื่องท้องถิ่นเรียกว่าการดำเนินการดึงข้อมูล ไวยากรณ์ของคำสั่งมีดังนี้

rsync -a ชื่อผู้ใช้ @ remote_host: path_of_remote_directory place_to_sync_on_local_machine


คำสั่ง "rsync" มีตัวเลือกมากมายในการใช้งาน ตัวเลือกที่สำคัญบางข้อได้อธิบายไว้ด้านล่างนี้

# "-a" เป็นตัวเลือกเดียวกับ -rlptgoD นี่คือบางส่วนของฟังก์ชันที่มีตัวเลือก "-a" ทำงาน

1.Descend recursively ลงในไดเร็กทอรีทั้งหมด (-r),
symlink 2.copy เป็น symlinks (-l),
3. ให้สิทธิ์แฟ้มสำรอง (-p),
4. ปรับเปลี่ยนช่วงเวลา (-t),
5. จัดกลุ่ม (-g),
6. เก็บความเป็นเจ้าของไฟล์ (-o) และ
7. เก็บอุปกรณ์เป็นอุปกรณ์ (-D)

# "-z" ใช้เพื่อบีบอัดไฟล์ในขณะส่งไฟล์

# "-P" เป็นตัวเลือกเดียวกับ - partial และ --progress

- ส่วนหนึ่ง - ใช้สำหรับดำเนินการโอนข้อมูลที่ขัดจังหวะ
--progress - ใช้สำหรับแสดงแถบความคืบหน้าของการถ่ายโอน

# "-v" - ใช้เพื่อแสดงผลลัพธ์ในลักษณะละเอียดมากขึ้น

คำสั่ง "rsync" มาพร้อมกับตัวเลือกมากมาย ขอแนะนำให้ใช้คำสั่ง "man" ด้วย rsync เพื่อควบคุมตัวเลือกทั้งหมด คำสั่งดังต่อไปนี้

คน rsync

Was this reply helpful?

Related topics

  • How to rsync two directories
  • sBlock - Backup on RHEL, CentOS, AlmaLinux & Rocky Linux
  • sBlock - Backup on Debian, Ubuntu and Related OS
  • Top Five โอเพนซอร์สซอฟต์แวร์สำรองข้อมูลสำหรับลินุกซ์
  • Rsync over SSH
  • วิธีการใช้ rsync ผ่าน SSH?
  • When to use Kubernetes?
  • Psychz ประกาศเปิดตัวศูนย์ข้อมูลยุโรปในกรุงลอนดอนและอัมสเตอร์ดัม
  • Price Match Promise: How to Secure the Best Deal on Dedicated Servers in Multiple U.S. Locations
  • Multi-Factor Authentication (MFA): A must for your account security!
  • Layer 7 DDoS
  • How to sell VPS from dedicated server?
  • How to configure IP's On Centos 7?
  • Dedicated Server Hosting For Wordpress (Need Recommendation)
  • Cloud Hosting กับ Dedicated Server - วิธีคุณเลือก?
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