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实战教学笔记-陈思齐 ---本教学笔记是本人学习和工作生涯中的摘记整理而成,此为初稿(尚有诸多不完善之处),为原创作品,允许转载,转载 ...
随机推荐
- oc39-- 类的内存存储
虚线是isa的指向,实线是继承关系. // // main.m // 类的本质 #import <Foundation/Foundation.h> #import "Person ...
- CodeForces - 735D Taxes (哥德巴赫猜想)
Taxes time limit per test 2 seconds memory limit per test 256 megabytes input standard input output ...
- B1934 [Shoi2007]Vote 善意的投票 最小割
一开始不太会,结果看完题解就是一个建图的网络流.然后就结了. 题干: 题目描述 幼儿园里有n个小朋友打算通过投票来决定睡不睡午觉.对他们来说,这个问题并不是很重要,于是他们决定发扬谦让精神.虽然每个人 ...
- B1789 Y型项链 贪心
想明白之后就是一道大水题,就是两两把最长公共前缀求出来,然后直接取最长的,然后就直接暴力算就行了... 题干: Description 欢乐岛上众多新奇的游乐项目让小可可他们玩的非常开心.现在他们正在 ...
- maven变量
一.pom文件,maven内置变量 ${basedir} 项目根目录 ${project.build.directory} 构建目录,缺省为target ${project.build.outputD ...
- C语言程序创建文件
#include <stdio.h>#include <stdlib.h>int main() { FILE *fp;if((fp=fopen("g:\\a.txt& ...
- Appium + python - 监控appium server start
import osimport time as t def start_appium(port = 4723,udid="4871660c"): a = os.popen(&quo ...
- Redis学习笔记(二):Redis集群
集群通过分片(sharding)来进行数据共享,并提供复制和故障转移功能. 1.节点 一个节点就是一个运行在集群模式下的Redis服务器.启动Redis服务器时,通过判断cluster-enabl ...
- [BZOJ1821][JSOI2010]部落划分
感觉学了这么久还是有那么一丢丢进步的...上个学期看到这道题,虽然早就学过并查集和二分了但还是一点思路都没有,现在可以秒切了呢 思路就是二分+并查集,有些人说是生成树,其实它没有变成树,只是运用了生成 ...
- poj1958-汉诺四塔问题(三种方法)
链接:http://poj.org/problem?id=1958 大意:汉诺塔升级版,四根柱子,n个盘子,求最少移动次数: 两种方法 递推or递归(当然还有思路3--打表) 思路1:递推(或者DP? ...