rsync: копировать файлы, если локальный файл не существует. Не проверять размер файла, время, контрольную сумму и т. д.

Я использую rsync для резервного копирования миллиона изображений с моего Linux-сервера на свой компьютер (Windows 7 с использованием Cygwin).

Команда, которую я использую сейчас:

rsync -rt --quiet --rsh='ssh -p2200' [email protected]:/home/XXX/public_html/XXX /cygdrive/images

Всякий раз, когда процесс прерывается, и я запускаю его снова, процесс копирования занимает много времени. Я думаю, что он проверяет каждый файл на наличие обновлений.

Изображения на моем сервере не изменятся после их создания.

Итак, есть ли более быстрый способ запустить команду, чтобы она могла копировать файлы, если локальный файл не существует, без проверки размера файла, времени, контрольной суммы и т. д.

Пожалуйста, предложите.

Спасибо


person Arnold    schedule 09.09.2013    source источник


Ответы (1)


вы пробовали этот флаг - это может помочь, но для возобновления передачи может потребоваться некоторое время:

       --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.
person mnagel    schedule 09.09.2013