1

我正在使用 rsync 将一百万个图像从我的 linux 服务器备份到我的计算机(使用 Cygwin 的 Windows 7)。

我现在使用的命令是:

rsync -rt --quiet --rsh='ssh -p2200' root@X.X.X.X:/home/XXX/public_html/XXX /cygdrive/images

每当该过程中断,我再次启动它时,开始复制过程需要很长时间。我认为它正在检查每个文件是否有任何更新。

我服务器上的图像一旦创建就不会改变。

那么,有没有更快的方法来运行命令,以便在不检查文件大小、时间、校验和等的情况下,如果本地文件不存在,它可以复制文件...

请建议。

谢谢

4

1 回答 1

3

您是否尝试过此标志 - 它可能会有所帮助,但可能仍需要一些时间才能恢复传输:

       --ignore-existing
          This tells rsync to skip updating files that already exist on the destination  (this  does  not  ignore
          existing directories, or nothing would get done).  See also --existing.

          This  option  is  a  transfer  rule,  not  an exclude, so it doesn't affect the data that goes into the
          file-lists, and thus it doesn't affect deletions.  It just limits the files that the receiver  requests
          to be transferred.

          This  option  can be useful for those doing backups using the --link-dest option when they need to con-
          tinue a backup run that got interrupted.  Since a --link-dest run is copied into a new directory  hier-
          archy  (when  it  is used properly), using --ignore existing will ensure that the already-handled files
          don't get tweaked (which avoids a change in permissions on the hard-linked files).  This does mean that
          this option is only looking at the existing files in the destination hierarchy itself.
于 2013-09-09T22:28:14.973 回答