Rsync
(1)When rsync is synchronized, if there is a soft connection in the source to be synchronized, how to synchronize the target file or directory of the soft connection?
rsync -avL /dira/ ip:/dirb/
#need add -L
(2)When rsync synchronizes data, how do I filter out all .txt files that are out of sync?
--exclude=“*.txt”
(3)When rsync synchronizes data, if the target file is newer than the source file, ignore the file. How do I do this?
-u
#or option
--update
(4)When using rsync to synchronize data, if we are using ssh mode, and the target machine's sshd port is not the default 22 port, then how do we do it?
rsync "--rsh=ssh -p 10022"
#or
rsync -e "ssh -p 10022"
(5) What is different below.
(1) rsync -av /dira/ ip:/dirb/
(2) rsync -av /dira/ ip::dirb
(1)synchronized by ssh
(2)Synchronized by rsync service
(6) Mirror sync, delete destination folder's extra files.
--delete
Last updated