f +++++++++在rsync日志中是什么意思? [英] What does f+++++++++ mean in rsync logs?

查看:184
本文介绍了f +++++++++在rsync日志中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用rsync备份服务器文件,我有两个问题:

I'm using rsync to make a backup of my server files, and I have two questions:

  1. 在此过程的中间,我需要停止并再次启动rsync.
    rsync是从停止点开始还是从头开始重新开始?

  1. In the middle of the process I need to stop and start rsync again.
    Will rsync start from the point where it stopped or it will restart from the beginning?

在日志文件中,我看到了"f+++++++++".是什么意思?

In the log files I see "f+++++++++". What does it mean?

例如:

2010/12/21 08:28:37 [4537] >f.st...... iddd/logs/website-production-access_log
2010/12/21 08:29:11 [4537] >f.st...... iddd/web/website/production/shared/log/production.log
2010/12/21 08:29:14 [4537] .d..t...... iddd/web/website/production/shared/sessions/
2010/12/21 08:29:14 [4537] >f+++++++++ iddd/web/website/production/shared/sessions/ruby_sess.017a771cc19b18cd
2010/12/21 08:29:14 [4537] >f+++++++++ iddd/web/website/production/shared/sessions/ruby_sess.01eade9d317ca79a

推荐答案

让我们看一下rsync的工作原理,并更好地理解神秘的结果行:

Let's take a look at how rsync works and better understand the cryptic result lines:

1-rsync的一个巨大优点是,下一次中断后,rsync会继续平稳运行.

1 - A huge advantage of rsync is that after an interruption the next time it continues smoothly.

如果同时没有更改,则下一个rsync调用将不会再次传输已传输的文件.但是,由于它不知道文件已被中断,因此它将从头开始再次检查所有文件以查找.

The next rsync invocation will not transfer the files again, that it had already transferred, if they were not changed in the meantime. But it will start checking all the files again from the beginning to find out, as it is not aware that it had been interrupted.

2-如果阅读man rsync

从问题中解码示例日志文件:

Decoding your example log file from the question:

> - the item is received
f - it is a regular file
s - the file size is different
t - the time stamp is different

.d..t ......

. - the item is not being updated (though it might have attributes 
    that are being modified)
d - it is a directory
t - the time stamp is different

> f +++++++++

> - the item is received
f - a regular file
+++++++++ - this is a newly created item


rsync手册页的相关部分:


The relevant part of the rsync man page:

-i,--itemize-changes

-i, --itemize-changes

请求一个简单的逐项清单,列出对每个文件所做的更改,包括属性更改.这与指定--out-format ='%i%n%L'完全相同.如果您重复此选项,则仅当接收的rsync至少为2.6.7版本时,才会输出未更改的文件(您可以将-vv与旧版本的rsync一起使用,但这也会打开其他详细信息mes- 圣人).

Requests a simple itemized list of the changes that are being made to each file, including attribute changes. This is exactly the same as specifying --out-format='%i %n%L'. If you repeat the option, unchanged files will also be output, but only if the receiving rsync is at least version 2.6.7 (you can use -vv with older versions of rsync, but that also turns on the output of other verbose mes- sages).

%i"转义具有11个字母长的隐秘输出.通用格式类似于字符串YXcstpoguax,其中Y替换为完成的更新类型,X替换为文件类型,其他字母表示如果被修改则可以输出的属性.

The "%i" escape has a cryptic output that is 11 letters long. The general format is like the string YXcstpoguax, where Y is replaced by the type of update being done, X is replaced by the file-type, and the other letters represent attributes that may be output if they are being modified.

替换Y的更新类型如下:

The update types that replace the Y are as follows:

  • <表示文件正在传输到远程主机(已发送).
  • >表示文件正在传输到本地主机(已接收).
  • c表示该项目正在发生本地更改/创建(例如,目录的创建或符号链接的更改等).
  • h表示该项目是到另一个项目的硬链接(需要--hard-links).
  • A .表示该项目没有被更新(尽管它的属性可能正在被修改).
  • *表示逐项输出区域的其余部分包含一条消息(例如正在删除").
  • A < means that a file is being transferred to the remote host (sent).
  • A > means that a file is being transferred to the local host (received).
  • A c means that a local change/creation is occurring for the item (such as the creation of a directory or the changing of a symlink, etc.).
  • A h means that the item is a hard link to another item (requires --hard-links).
  • A . means that the item is not being updated (though it might have attributes that are being modified).
  • A * means that the rest of the itemized-output area contains a message (e.g. "deleting").

替换X的文件类型为:f代表文件,d代表目录,L代表符号链接,D代表设备,S代表一个特殊的文件(例如,名为sockets和fifos).

The file-types that replace the X are: f for a file, a d for a directory, an L for a symlink, a D for a device, and a S for a special file (e.g. named sockets and fifos).

上面的字符串中的其他字母是如果要更新项目的关联属性或."将输出的实际字母.没有任何改变.三种例外情况是:(1)新创建的项目用"+"替换每个字母,(2)相同的项目用空格替换点,以及(3)未知属性用?"替换每个字母(与较旧的rsync通话时可能会发生这种情况.)

The other letters in the string above are the actual letters that will be output if the associated attribute for the item is being updated or a "." for no change. Three exceptions to this are: (1) a newly created item replaces each letter with a "+", (2) an identical item replaces the dots with spaces, and (3) an unknown attribute replaces each letter with a "?" (this can happen when talking to an older rsync).

与每个字母关联的属性如下:

The attribute that is associated with each letter is as follows:

  • c意味着常规文件具有不同的校验和(需要--checksum),或者符号链接,设备或特殊文件的值已更改.请注意,如果您将文件发送到3.0.1之前的rsync,则此更改标志仅在校验和不同的常规文件中显示.
  • s表示常规文件的大小不同,并且将通过文件传输进行更新.
  • A t表示修改时间不同,并且正在更新为发件人的值(需要--times). T的替代值表示将修改时间设置为传输时间,这是在不使用--times更新文件/符号链接/设备并且更改符号链接且接收者无法设置其时间的情况下发生的. (注意:使用rsync 3.0.0客户端时,对于此时间设置失败,您可能会看到s标志与t组合在一起,而不是正确的T标志.)
  • p表示权限不同,并且正在更新为发件人的值(需要--perms).
  • o表示所有者不同,并且正在更新为发送者的值(需要--owner和超级用户特权).
  • g表示该组不同,并且正在更新为发件人的值(需要--group和设置该组的权限).
  • u插槽保留供将来使用.
  • a表示ACL信息已更改.
  • x表示扩展属性信息已更改.
  • A c means either that a regular file has a different checksum (requires --checksum) or that a symlink, device, or special file has a changed value. Note that if you are sending files to an rsync prior to 3.0.1, this change flag will be present only for checksum-differing regular files.
  • A s means the size of a regular file is different and will be updated by the file transfer.
  • A t means the modification time is different and is being updated to the sender’s value (requires --times). An alternate value of T means that the modification time will be set to the transfer time, which happens when a file/symlink/device is updated without --times and when a symlink is changed and the receiver can’t set its time. (Note: when using an rsync 3.0.0 client, you might see the s flag combined with t instead of the proper T flag for this time-setting failure.)
  • A p means the permissions are different and are being updated to the sender’s value (requires --perms).
  • An o means the owner is different and is being updated to the sender’s value (requires --owner and super-user privileges).
  • A g means the group is different and is being updated to the sender’s value (requires --group and the authority to set the group).
  • The u slot is reserved for future use.
  • The a means that the ACL information changed.
  • The x means that the extended attribute information changed.

可能会有另一个输出:删除文件时,%i"将为要删除的每个项目输出字符串"* deleting"(假设您正在与最近的rsync交谈,它记录删除操作而不是记录将其作为详细消息输出).

One other output is possible: when deleting files, the "%i" will output the string "*deleting" for each item that is being removed (assuming that you are talking to a recent enough rsync that it logs deletions instead of outputting them as a verbose message).

这篇关于f +++++++++在rsync日志中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆