Rsync
Linux之间目录同步
使用rsync
实验环境:
(centos 7)一台私网主机IP:10.3.135.34
(centos 7)一台公网主机IP:45.136.184.49
操作步骤
使用Rsync同步;需要同步的两台主机都需要安装Rsync
yum -y install Rsync
rsync --help
-v, --verbose increase verbosity
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-p, --perms preserve permissions
-t, --times preserve modification times
-o, --owner preserve owner (super-user only)
-g, --group preserve group
–devices preserve device files (super-user only)
–specials preserve special files
-a包含以上所有 最常用