Skip to content

Commit e1d513b

Browse files
DeepAnchorjameswpm
authored andcommitted
fix "rsync configuration"
1 parent e235762 commit e1d513b

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

en/12.4.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ For the other Linux distributions, please use the appropriate package management
3232

3333
### Rsync Configuration
3434

35-
Rsync can be configured from three main configuration files: `rsyncd.conf` which is the main configuration file, `rsyncd.secrets` which holds passwords and `rsyncd.motd`, which contains server information.
35+
Rsync can be configured from three main configuration files: `rsyncd.conf` which is the main configuration file, `rsyncd.secrets` which holds passwords, and `rsyncd.motd` which contains server information.
3636

37-
You can refer to the documentation on rsync's official website for a more detailed explanation, but here we will just introduce the basics of setting up rsync on your servers.
37+
You can refer to the official documentation on rsync's website for more detailed explanations, but here we will simply introduce the basics of setting up rsync:.
3838

39-
Several documents about this configuration we can refer to the official website or other websites rsync introduction, here the server and client how to open
40-
41-
- Services client opens:
4239
- Starting an rsync daemon server-side:
4340

4441
`# /usr/bin/rsync --daemon --config=/etc/rsyncd.conf`
@@ -54,20 +51,20 @@ Setup an rsync username and password, making sure that it's owned only by root,
5451

5552
- Client synchronization:
5653

57-
Clients can synchronize servers files with the following command:
54+
Clients can synchronize server files with the following command:
5855

59-
rsync -avzP --delete --password-file=rsyncd.secrets [email protected]::www/var/rsync/backup
56+
rsync -avzP --delete --password-file=rsyncd.secrets [email protected]::www /var/rsync/backup
6057

61-
Let's break this command down into a few key points:
58+
Let's break this down into a few key points:
6259

63-
1. `-avzP` is what the reader can use the `-help` Show
64-
2. `-delete` for example A, deleted a file, the time synchronization, B will automatically delete the corresponding files
65-
3. `-Password-file` client/etc/rsyncd.secrets set password, and server to `/etc/rsyncd.secrets` the password the same, so cron is running, you do not need the password
66-
4. This command in the " User Name" for the service side of the `/etc/rsyncd.secrets` the user name
67-
5. This command 192.168.145.5 as the IP address of the server
68-
6. :: www, note the two: number, www as a server configuration file `/etc/rsyncd.conf` in [www], meaning that according to the service on the client `/etc/rsyncd.conf` to synchronize them [www] paragraph, a: number, when used according to the configuration file does not directly specify the directory synchronization.
60+
1. `-avzP` are some common options. Use `rsync --help` to review what these do.
61+
2. `--delete` deletes extraneous files on the receiving side. For example, if files are deleted on the sending side, the next time the two machines are synchronized, the receiving sides will automatically delete the corresponding files.
62+
3. `--password-file` specifies a password file for accessing an rsync daemon. On the client side, this is typically the `client/etc/rsyncd.secrets` file, and on the server side, it's `/etc/rsyncd.secrets`. When using something like Cron to automate rsync, you won't need to manually enter a password.
63+
4. `username` specifies the username to be used in conjunction with the server-side `/etc/rsyncd.secrets` password
64+
5. `192.168.145.5` is the IP address of the server
65+
6. `::www` (note the double colons), specifies contacting an rsync daemon directly via TCP for synchronizing the `www` module according to the server-side configurations located in `/etc/rsyncd.conf`. When only a single colon is used, the rsync daemon is not contacted directly; instead, a remote-shell program such as ssh is used as the transport .
6966

70-
In order to synchronize real-time, you can set the crontab, keeping rsync synchronization every minute, of course, users can also set the level of importance depending on the file type of synchronization frequency.
67+
In order to periodically synchronize files, you can set up a crontab file that will run rsync commands as often as needed. Of course, users can vary the frequency of synchronization according to how critical it is to keep certain directories or files up to date.
7168

7269
## MySQL backup
7370

0 commit comments

Comments
 (0)