首页 > 系统服务 > 详细

Linux下的数据备份工具rsync

时间:2018-02-23 15:49:30      阅读:215      评论:0      收藏:0      [点我收藏+]
rsync(remote sync): 远程同步,可以本地同步数据,不会覆盖以前的数据,而是先判断已经存在的数据和新数据的差异,只有数据不同时才会把不相同的部分覆盖。

# yum install rsync.x86_64 -y

本地同步

[root@apenglinux-001 ~]# rsync -av /etc/passwd /tmp/password
sending incremental file list
passwd

sent 959 bytes  received 31 bytes  1980.00 bytes/sec
total size is 885  speedup is 0.89

远程同步(同步到另一台机器,另一台机器也需要安装rsnyc)

[root@apenglinux-001 ~]# rsync -av /etc/passwd 192.168.221.20:/tmp/password
root@192.168.221.20's password: 
sending incremental file list
passwd

sent 959 bytes  received 31 bytes  220.00 bytes/sec
total size is 885  speedup is 0.89

rsync的命令格式 

rsync [option]... src dest
rsync [option]... src [user@]host:dest
rsync [option]... [user@]host:src dest
rsync [option]... [user@]host::src dest
rsync [option]... src [user@]host::dest


Linux下的数据备份工具rsync

原文:http://blog.51cto.com/13480443/2072360

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!