rsync增量同步标志位详细解释
rsync非常强大,下面是我用rsync做目录备份时用到的参数:
rsync -ruPi -plEt /home/op/photo/ /remote_backup/photo/ --dry-run
-r 循环目录
-u update模式,只同步更新过的
-P 等于--partial --progress,显示进度,并支持断点续传
-i 显示每个文件的同步细节,见下面--itemize-changes部分
-p 保留权限
-l 拷贝软链接(如果要拷贝链接指向的实际文件,用-L)
-E 保留执行权限
-t 保留修改时间
--delete 同步删除动作
其中,-i 显示每个文件的同步细节,见下面--itemize-changes部分
下面内容转自:stackoverflow
Explanation of each bit position and value in rsync's output:
YXcstpoguax path/to/file
|||||||||||
||||||||||╰- x: The extended attribute information changed
|||||||||╰-- a: The ACL information changed
||||||||╰--- u: The u slot is reserved for future use
|||||||╰---- g: Group is different
||||||╰----- o: Owner is different
|||||╰------ p: Permission are different
||||╰------- t: Modification time is different
|||╰-------- s: Size is different
||╰--------- c: Different checksum (for regular files), or
|| changed value (for symlinks, devices, and special files)
|╰---------- the file type:
| f: for a file,
| d: for a directory,
| L: for a symlink,
| D: for a device,
| S: for a special file (e.g. named sockets and fifos)
╰----------- the type of update being done::
<: file is being transferred to the remote host (sent)
>: file is being transferred to the local host (received)
c: local change/creation for the item, such as:
- the creation of a directory
- the changing of a symlink,
- etc.
h: the item is a hard link to another item (requires
--hard-links).
.: the item is not being updated (though it might have
attributes that are being modified)
*: means that the rest of the itemized-output area contains
a message (e.g. "deleting")
Some example output from rsync for various scenarios:
>f+++++++++ some/dir/new-file.txt
.f....og..x some/dir/existing-file-with-changed-owner-and-group.txt
.f........x some/dir/existing-file-with-changed-unnamed-attribute.txt
>f...p....x some/dir/existing-file-with-changed-permissions.txt
>f..t..g..x some/dir/existing-file-with-changed-time-and-group.txt
>f.s......x some/dir/existing-file-with-changed-size.txt
>f.st.....x some/dir/existing-file-with-changed-size-and-time-stamp.txt
cd+++++++++ some/dir/new-directory/
.d....og... some/dir/existing-directory-with-changed-owner-and-group/
.d..t...... some/dir/existing-directory-with-different-time-stamp/
rsync增量同步标志位详细解释的更多相关文章
- 记一次rsync增量同步远程服务器文件
rsync remote shell 增量方式同步数据 rsync同步文件有两种方式,一种是daemon的方式(rsync daemon)另一种方式是通过远程shell方式(rsync remote ...
- rsync 增量同步总是多两行数据
从google云机器rsync日志到本地,并通过logstash格式化后存入elasticsearch,但在实施过程中发现,每次rsync后通过查看elasticsearch,都会将上次已同步的数据再 ...
- Linux系统——Rsync数据同步工具
Rsync的优点及缺点 优点:类似cp命令.scp命令,但rsync为增量复制工具 缺点:针对大文件,效率非常高(打包再比对),针对小文件,效率非常低. Rsync作用 (1)可使本地和远程两台主机之 ...
- rsync用法详细解释
提要 熟悉 rsync 的功能及其特点 掌握 rsync 语法及常用选项的功能 掌握 rsync 命令的三种基本使用方法 掌握如何筛选 rsync 的传输目标 掌握使用 rsync 进行镜像和增量备份 ...
- rsync命令比对文件及增量同步
A fast,versatile,remote (and local) file-copying tool. rsync基于ssh协议实现高效率远程或本地文件复制,传输速度比scp快.复制文件时会比对 ...
- 三次握手和四次挥手以及TCP标志位的详细介绍
一.TCP标志位 在讲TCP三次握手和四次挥手之前,先说一下TCP标志位,方便后续的理解. 简单来说,TCP标志位的值代表了当前请求的目的. 标志位一共有6种,分别是: SYN(synchronous ...
- 多线程设置flag标志位实现同步
信号灯解决同步问题 我尽量注释了代码,可以很容易理解了. package Thread; /** * 信号灯 * 借助标志位 */ public class FlagThread { public s ...
- 韩顺刚-tcp报文头协议详细分析第一包数据:序号是0,发送数据的长度是0,因为没有收到对端的数据,所以确认号是0, Syn的标志位设置成1,这里没有发送的数据,只发送TCP的20个字节的头部
TCP报文段首部格式 大部分TCP报文头部都是20个字节,有的数据包要加上选项. 上面一行代表4个字节,源端口和目的端口都是2个字节. TCP协议是面向字节流的协议 TCP是一段一段分块的发送数据的 ...
- Linux实战教学笔记21:Rsync数据同步工具
第二十一节 Rsync数据同步工具 标签(空格分隔): Linux实战教学笔记-陈思齐 ---本教学笔记是本人学习和工作生涯中的摘记整理而成,此为初稿(尚有诸多不完善之处),为原创作品,允许转载,转载 ...
随机推荐
- Android自己定义Toast
一.引言 在开发的过程中你会发现Android自身的Toast提示有很多限制,比方我想自己定义Toast的动画.自己定义一个美观的View显示在Toast中.很多其它的是让Toast显示指定的时长等等 ...
- broadleaf commerce到mysql和tomcat的迁移
近期刚刚接触broadleaf commerce, 一个电商站点的开源模版.详细的执行和配置能够參考链接:点击打开链接 而该模版是在jetty容器下执行的,数据库是HSQL.官方站点上给出了怎样将数据 ...
- 【ODPS】阿里云ODPS中带分区的表操作
1.创建分区表: 分区表有自己的分区列,而分区表则没有. public static void createTableWithPartition(Odps odps, String createTab ...
- Python3.4 远程操控电脑(开关机)
import poplib import sys import smtplib from email.mime.text import MIMEText import os from email.he ...
- extjs的formpanel横向滚动条的解决办法
关于formpanel设置autoscroll:true同时出现横向和纵向滚动条的解决办法: 不要设置autoscroll属性,或者autoscroll:false,然后设置bodyStyle : ' ...
- hihocoder 1671 反转子串
时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个只包含括号和小写字母的字符串S,例如S="a(bc(de)fg)hijk". 其中括号表示将里 ...
- P1390--公约数的和
这个题比较狗,一开始没有啥思路,但是看完题解觉得还是比较好理解的.主要思路就是需要把每个数是几个数的最大公约数求出来,然后求和就行了.蓝书P124例九 设f(n) = gcd(1,n) + gcd(2 ...
- Genuitec
- lowbit( )运算
--------开始-------- lowbit (n) 定义为非负整数n在二进制表示下“最低位的1及其后面所有的0构成的数值. 比如: n = 10 的二进制下为1010,则lowbit (n) ...
- MySQL学习笔记之左连接
MySQL的左连接 #左连接,以左表为基表 select class1.stuid,class1.stuname,sex,course from class1 left join course on ...