diff --git a/en/12.4.md b/en/12.4.md index 56bff9af..a4f42ef9 100644 --- a/en/12.4.md +++ b/en/12.4.md @@ -32,13 +32,10 @@ For the other Linux distributions, please use the appropriate package management ### Rsync Configuration -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. +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. -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. +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:. -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 - -- Services client opens: - Starting an rsync daemon server-side: `# /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, - Client synchronization: -Clients can synchronize servers files with the following command: +Clients can synchronize server files with the following command: - rsync -avzP --delete --password-file=rsyncd.secrets username@192.168.145.5::www/var/rsync/backup + rsync -avzP --delete --password-file=rsyncd.secrets username@192.168.145.5::www /var/rsync/backup -Let's break this command down into a few key points: +Let's break this down into a few key points: -1. `-avzP` is what the reader can use the `-help` Show -2. `-delete` for example A, deleted a file, the time synchronization, B will automatically delete the corresponding files -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 -4. This command in the " User Name" for the service side of the `/etc/rsyncd.secrets` the user name -5. This command 192.168.145.5 as the IP address of the server -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. +1. `-avzP` are some common options. Use `rsync --help` to review what these do. +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. +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. +4. `username` specifies the username to be used in conjunction with the server-side `/etc/rsyncd.secrets` password +5. `192.168.145.5` is the IP address of the server +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 . -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. +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. ## MySQL backup