Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use periodic synchronization and real-time synchronization in rsync remote synchronization

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use regular synchronization and real-time synchronization in rsync remote synchronization. I think it is very practical, so I share it with you. I hope you can get something after reading this article.

About rsync.

A fast incremental backup tool

1.Remote Sync, remote synchronization 2. Support local replication, or synchronize with other SSH or rsync hosts. Official website: http://rsync.samba.org configure rsync source server

Rsync synchronization source:

Refers to the remote server for backup operations, also known as the backup source configuration rsync source

Basic ideas:

1. Establish rsyncd.conf configuration files and independent account files. Enable rsync-- daemon mode

Application example:

1. User backuper, allowing downlink synchronization 2. The directory of the operation is / var/www/html/

Profile rsyncd.conf

1. Need to build manually, the syntax is similar to Samba configuration 2. Authentication is configured with auth users and secrets file. If not added, it is anonymous.

Rsync account file

1. The record format of "user name: password" is adopted, with one user record per line. Independent account data, not dependent on system account

Enable the rsync service

1. Use the rsync backup tool through-- daemon to provide services alone [execute kill $(catIvar/run/rsyncd.pid) to shut down the rsync service]

Usage of the rsync command:

Rsync [option] original location target location 1. Common options:-a: archive mode, recursively retain object attributes, equivalent to-rlptgoD-v: show details of synchronization (verbose) information-z: compress (compress) when transferring files-H: keep hardconnected files-A: retain ACL attribute information-delete: delete files that are in the target location but not in the original location-checksum: decide whether to skip files based on the checksum of the object

There are two ways to identify the source: format 1: user name @ host address:: shared module name

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report