自动化 sftp 上传过程

发布于 2024-07-23 17:27:57 字数 140 浏览 1 评论 0原文

我正在寻找一种将文件/目录结构从一台服务器上传到另一台服务器的方法。 在我的情况下,唯一可能的方法是 SFTP 上传,是否有任何简单的方法可以上传它,使用脚本或其他方法,而不需要对文件/目录进行存档,我想在远程服务器上重新创建?

谢谢你!

I'm looking for a way to upload files/dirs structure from one server to another..
The only way it's possible in my case is SFTP upload, is there any easy way to upload it, using script or something without making archive of files/dirs, I want to recreate on remote server?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

迷路的信 2024-07-30 17:27:57

也许可以使用递归 scp (scp -r) 找到解决方案? 或者您是否明确仅限于 sftp?

还有一个名为 lftp 的客户端,它具有 sftp 和脚本支持 - 很像我想象的批处理文件 - ftp 命令列表。 (http://lftp.yar.ru/lftp-man.html)

Perhaps a solution could be found using recursive scp (scp -r)? Or are you limited explicitly to sftp only?

There's also a client named lftp which has sftp and scripting support - much like batch file I would imagine - a list of ftp commands. (http://lftp.yar.ru/lftp-man.html)

§普罗旺斯的薰衣草 2024-07-30 17:27:57

您可能需要考虑 Syncplify.me FTP 脚本! 作为解决方案。 它允许您编写非常简单的脚本来实现您的目标。
例如,将整个目录上传到远程 SFTP 服务器实际上是将一行代码添加到一个现成的模板中。
http://www.syncplify.me/products/ftp-script/

You may want to consider Syncplify.me FTP Script! as a solution. It allows you to write very simple scripts to achieve your goal.
For example, uploading an entire directory to a remote SFTP server would actually be a single line of code added to one of the ready-made templates.
http://www.syncplify.me/products/ftp-script/

终陌 2024-07-30 17:27:57

edtFTPj/PRO 是一个具有综合脚本引擎的 Java SFTP 客户端。 作为 Java,您可以在任何支持 Java 的平台上运行它。

以下是有关脚本支持的更多详细信息。 它有一个“mput”命令,可以将当前目录中的所有文件上传到远程目录。

尚不支持递归传输,但如果需要,可以轻松添加 - 如果您感兴趣,请发送电子邮件支持。

edtFTPj/PRO is a Java SFTP client that has a comprehensive scripting engine. Being Java you can run it on any platform where Java is supported.

Here's some more details on the scripting support. It has an 'mput' command that uploads all the files in the current directory to the remote directory.

Recursive transfers aren't yet supported, but could easily be added if required - email support if you are interested.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文