Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/books/learning_rsync/01_rsync_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The original `rsync` was maintained by the Australian programmer <font color=red
![ Andrew Tridgell ](images/Andrew_Tridgell.jpg)
![ Wayne Davison ](images/Wayne_Davison.jpg)

!!! note "Attention!"
!!! note "note"

**rsync itself is only an incremental backup tool and does not have the function of real-time data synchronization (it needs to be supplemented by other programs). In addition, synchronization is one-way. If you want to realize two-way synchronization, you need to cooperate with other tools.**

Expand Down
4 changes: 2 additions & 2 deletions docs/books/learning_rsync/02_rsync_demo01.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Fedora34-->|pull/download|RockyLinux8;

## Demonstration based on SSH protocol

!!! tip "Attention!"
!!! tip "tip"

Here, both Rocky Linux 8 and Fedora 34 use the root user to log in. Fedora 34 is the client and Rocky Linux 8 is the server.

Expand Down Expand Up @@ -92,7 +92,7 @@ aabbcc
```
The transfer was successful.

!!! tip "Attention"
!!! tip "tip"

If the server's SSH port is not the default 22, you can specify the port in a similar way---`rsync -avz -e 'ssh -p [port]' `.

Expand Down
2 changes: 1 addition & 1 deletion docs/books/learning_rsync/03_rsync_demo02.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Some parameters and values ​​of this file are as follows, [ here ](04_rsync_
| auth users = li| Enable virtual users and define what a virtual user is called. Need to create it yourself|
| secrets file = /etc/rsyncd_users.db | Used to specify the location of the virtual user's password file, which must end in .db. The content format of the file is "Username: Password", one per line |

!!! tip "Attention!"
!!! tip "tip"

The permission of the password file must be <font color=red>600</font>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Last login: Tue Nov 2 21:42:44 2021 from 192.168.100.5
[testrsync@Rocky ~]$
```

!!! tip "Attention!"
!!! tip "tip"

The server configuration file **/etc/ssh/sshd_config** should be opened <font color=red>PubkeyAuthentication yes</font>

Expand Down Expand Up @@ -95,6 +95,6 @@ sent 30 bytes received 193 bytes 148.67 bytes/sec
total size is 883 speedup is 3.96
```

!!! tip "tip!"
!!! tip "tip"

You can write this variable into **/etc/profile** to make it take effect permanently. The content is: `export RSYNC_PASSWORD=13579`
6 changes: 3 additions & 3 deletions docs/books/learning_rsync/06_rsync_inotify.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Back to the first terminal pts/0, the output information is as follows:

## Combination of `inotifywait` and `rsync`

!!! tip "Attention!"
!!! tip "tip"

We are operating in Rocky Linux 8 server, using SSH protocol for demonstration.

Expand All @@ -142,12 +142,12 @@ $a | while read directory event file
[root@Rocky ~]# bash /root/rsync_inotify.sh &
```

!!! tip "emphasize again!"
!!! tip "tip"

When using the SSH protocol for data synchronization transmission, if the SSH service port of the target machine is not 22, you can use a method similar to this——
`b="/usr/bin/rsync -avz -e 'ssh -p [port-number]' /rsync/* testfedora@192.168.100.5:/home/testfedora/"`

!!! tip "Attention!"
!!! tip "tip"

If you want to start this script at boot
`[root@Rocky ~]# echo "bash /root/rsync_inotify.sh &" >> /etc/rc.local`
Expand Down
8 changes: 4 additions & 4 deletions docs/books/learning_rsync/07_rsync_unison_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Last login: Wed Nov 3 22:07:18 2021 from 192.168.100.5
[testrsync@Rocky ~]$
```

!!! tip "Attention"
!!! tip "tip"

The configuration files of the two machines **/etc/ssh/sshd_config** should be opened <font color=red>PubkeyAuthentication yes</font>

Expand Down Expand Up @@ -132,16 +132,16 @@ done
[root@fedora ~]# jobs -l
```

!!! tip "Attention!"
!!! tip "tip"

For two-way synchronization, the scripts of both machines must be started, otherwise an error will be reported.

!!! tip "Attention!"
!!! tip "tip"

If you want to start this script at boot
`[root@Rocky ~]# echo "bash /root/unison1.sh &" >> /etc/rc.local`
`[root@Rocky ~]# chmod +x /etc/rc.local`

!!! tip "Attention!"
!!! tip "tip"

If you want to stop the corresponding process of this script, you can find it in the `htop` command and then **kill**