Как зеркалировать каталоги, используя Bitvise sftpc.exe - PullRequest
0 голосов
/ 23 октября 2019

Клиент Bitvise SSH история версий утверждает, что v8.15 поддерживает зеркалирование каталогов:

Графический клиент SSH и sftpc теперь поддерживают рекурсивное зеркалирование каталогов. Каталог и все его подкаталоги и файлы могут быть синхронизированы либо в направлении загрузки, либо в направлении загрузки.

Я могу найти его в графическом интерфейсе, но не могу найти, как это сделать, используя sftpc.exe,В sftpc.exe -help.

нет упоминания о зеркальном отображении. Как выполнить зеркальное отображение каталогов из командной строки?

1 Ответ

1 голос
/ 25 октября 2019

Вы указываете на проблему с тангенциальным дизайном в sftpc: для получения справки по командам SFTP требуется интерактивное использование sftpc и подключение к серверу. Затем вы можете получить помощь из интерактивного приглашения.

Это неудобно, поэтому я открыл запрос на добавление функции интерактивной справки и из командной строки.

СправкаТекст, который вы ищете, выглядит следующим образом - для команды put:

sftp> help put
USAGE: put local-path [remote-path] [-bg | -fg] [-s] [-o] [-r]
           [-f] [-noTime] [-m=mode] [-dm=mode] [-mirror [-erase]]
           [-b | -lf | -std | -tlf | -t]
DESCRIPTION: Upload file.
PARAMETERS:
 -bg      Start (queue) upload in background.
 -fg      Start upload in foreground.
 -s       Include subdirectories (recursive).
 -r       Synchronize file content. If synchronization is not available,
          resume existing incomplete files using a heuristic resume.
          Heuristic resume MAY result in an inconsistent destination file
          if the destination file content has been modified in the middle.
 -o       Synchronize file content. If synchronization is not available,
          force existing file to be overwritten. If -r is also specified,
          heuristic resume is tried first.
 -del     Remove local file after successful upload.
 -f       Assume remote-path is a file (not a directory)
 -noTime  Do not synchronize file modification times.
 -m=mode  Set the access mode for remote files to 'mode'.
 -dm=mode Set the access mode for new remote directories to 'mode'.
          If directory already exists, access mode will not be changed.
 -mirror  Mirror local-path to remote-path. Local files that do not exist
          remotely will be uploaded. Remote files that are different than
          their local versions will be overwritten.
 -erase   With -mirror, erase remote files that are not present locally.

FILE TRANSFER MODE - if present, overrides mode selected with "type":
 -b       Upload files as binary; no conversions.
 -lf      Auto-detect text files. In text files, replace CRLF with LF.
          Binary files are unaffected.
 -std     Auto-detect text files. Upload text files using the SFTP v4+ text
          file transfer mechanism. Binary files are unaffected. Not
          available when SFTP version 3 or lower is in use.
 -tlf     Upload all files as textual. Replace all CRLF bytes with LF.
 -t       Upload all files using the SFTP v4+ text file transfer mechanism.
          Not available when SFTP version 3 or lower is in use.

И для команды get:

sftp> help get
USAGE: get remote-path [local-path] [-bg | -fg] [-s] [-o] [-r]
           [-f] [-noTime] [-lit] [-mirror [-erase]]
           [-b | -lf | -std | -tlf | -t]
DESCRIPTION: Download file.
PARAMETERS:
 -bg     Start (queue) download in background.
 -fg     Start download in foreground.
 -s      Include subdirectories (recursive).
 -r      Synchronize file content. If synchronization is not available,
         resume existing incomplete files using a heuristic resume.
         Heuristic resume MAY result in an inconsistent destination file
         if the destination file content has been modified in the middle.
 -o      Synchronize file content. If synchronization is not available,
         force existing file to be overwritten. If -r is also specified,
         heuristic resume is tried first.
 -del    Remove remote file after successful download.
 -f      Assume remote-path is a file (not a directory).
 -noTime Do not synchronize file modification times.
 -lit    Treat remote-path literally (not a wildcard pattern).
 -mirror Mirror remote-path to local-path. Remote files that do not exist
         locally will be downloaded. Local files that are different than
         their remote versions will be overwritten.
 -erase  With -mirror, erase local files that are not present remotely.

FILE TRANSFER MODE - if present, overrides mode selected with "type":
 -b      Download files as binary; no conversions.
 -lf     Auto-detect text files. In text files, replace LF with CRLF.
         Binary files are unaffected.
 -std    Behaves same as -lf when downloading. Not available when SFTP
         version 3 or lower is in use.
 -tlf    Download all files as textual. Replace all LF bytes with CRLF.
 -t      Download all files using the SFTP v4 text file transfer mechanism.
         Not available when SFTP version 3 or lower is in use.

Надеюсь, это поможет!

Обычно я не отслеживаю переполнение стека, поэтому, пожалуйста, не стесняйтесь, обращайте мое внимание, открывая службу поддержки Bitvise, если вам нужно, чтобы я посмотрел на что-то другое.

Я также рекомендую использовать последнюю версию Bitvise. Версия клиента SSH. В настоящее время это 8,35. Это бесплатно для использования в любой среде, и мы стараемся, чтобы каждая версия была строгим обновлением, которое не представляет новых трудностей. Мы хотим, чтобы не было причин оставаться позади. : -)

...