如何使用 Bitvise 镜像目录 sftpc.exe

How to mirror directories using Bitvise sftpc.exe

Bitvise SSH 客户端version history声明 v8.15 支持目录镜像:

The graphical SSH Client and sftpc now support recursive directory mirroring. A directory and all of its subdirectories and files can be synchronized either in the upload or download direction.

我可以在 GUI 中找到它,但我找不到如何使用 sftpc.exe。 sftpc.exe -help.

中没有提到镜像

如何从命令行进行目录镜像?

您指出了 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.

希望对您有所帮助!

我通常不监控 Stack Overflow,所以如果您需要我查看其他内容,请随时通过使用 Bitvise 打开支持案例来引起我的注意。

我还建议使用最新的 Bitvise SSH 客户端版本。目前,这是 8.35。在任何环境下都可以免费使用,我们尽量保证每个版本都是严格的升级,不引入新的困难。我们希望没有理由留下来。 :-)