GithubHelp home page GithubHelp logo

Comments (4)

windvalley avatar windvalley commented on June 8, 2024 1

@super-vip 已发布新版本解决这个问题,新版本push默认将不压缩,可使用-z参数使用原有的压缩传输方式。

$ gossh push -h

Copy local files and dirs to target hosts.

Usage:
  gossh push [HOST...] [flags]

Examples:

  Copy a local file or dir to /tmp/ of the target hosts by default.
  $ gossh push host[1-2] -f /path/foo -k

  Copy local files and dirs to /home/user/ of the target hosts.
  $ gossh push host[1-2] -f /path/foo.txt,/path/bar/ -d /home/user -k

  Enable zip files feature (zip first, then push).
  $ gossh push host[1-2] -f /path/foo.txt,/path/bar/ -d /home/user -k -z

  Find more examples at: https://github.com/windvalley/gossh/blob/main/docs/push.md

Flags:
  -f, --files strings      local files/dirs to be copied to target hosts
  -d, --dest-path string   path of target hosts where files/dirs will be copied to (default "/tmp")
  -F, --force              allow overwrite files/dirs if they already exist on target hosts
  -z, --zip                enable zip files ('unzip' must be installed on target hosts)
  -h, --help               help for push

Global Flags:
...

from gossh.

super-vip avatar super-vip commented on June 8, 2024 1

经过测试,添加了 push -z 参数后非常靠谱,开启并发后,10秒内就往2台目标机上分别传完5G左右的文件夹。
现在适用场景更广泛更灵活了。点赞!
另外,如果一起发布有 arm64 架构的 gossh-v1.13.0-linux-arm64 就更省事了。
感谢! @windvalley

from gossh.

windvalley avatar windvalley commented on June 8, 2024

你那具体的场景是怎样的,比如传输的文件的格式,大小,怎么判断的执行效率,对比数据之类的。

我之前简单做过几个场景的对比数据,压缩的整体效率会高不少。

感谢反馈。@super-vip

from gossh.

super-vip avatar super-vip commented on June 8, 2024

有压缩功能某些场景确实可以省一些时间,如果提供一个开关,让用户选择是否启用这个功能可能会更灵活一点。
例如:
局域网内从本机并发push本地文件或本地的一些文件夹到10台SSH上,这个压缩功能就太耗时了……要是文件个数很多或文件很大,这消耗的时间是噩梦啊。
例如这个同名项目:https://github.com/andesli/gossh
这个项目的不使用压缩功能,不会对系统要求安装额外依赖,文件不压缩直接进行传输,几个G的本地文件夹并发push到10台服务器的场景分分钟就传完了。
感谢老师百忙中的回复。@windvalley

from gossh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.