You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/12.4.md
+12-15Lines changed: 12 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,10 @@ For the other Linux distributions, please use the appropriate package management
32
32
33
33
### Rsync Configuration
34
34
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.
36
36
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:.
38
38
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
Let's break this command down into a few key points:
58
+
Let's break this down into a few key points:
62
59
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 .
69
66
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.
0 commit comments