Comments (4)
@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.
经过测试,添加了 push -z 参数后非常靠谱,开启并发后,10秒内就往2台目标机上分别传完5G左右的文件夹。
现在适用场景更广泛更灵活了。点赞!
另外,如果一起发布有 arm64 架构的 gossh-v1.13.0-linux-arm64 就更省事了。
感谢! @windvalley
from gossh.
你那具体的场景是怎样的,比如传输的文件的格式,大小,怎么判断的执行效率,对比数据之类的。
我之前简单做过几个场景的对比数据,压缩的整体效率会高不少。
感谢反馈。@super-vip
from gossh.
有压缩功能某些场景确实可以省一些时间,如果提供一个开关,让用户选择是否启用这个功能可能会更灵活一点。
例如:
局域网内从本机并发push本地文件或本地的一些文件夹到10台SSH上,这个压缩功能就太耗时了……要是文件个数很多或文件很大,这消耗的时间是噩梦啊。
例如这个同名项目:https://github.com/andesli/gossh
这个项目的不使用压缩功能,不会对系统要求安装额外依赖,文件不压缩直接进行传输,几个G的本地文件夹并发push到10台服务器的场景分分钟就传完了。
感谢老师百忙中的回复。@windvalley
from gossh.
Related Issues (20)
- The outputs that were originally 'FAILED' was marked as 'SUCCESS'
- Optimize log formats(that not in json format)
- [Plan] Add subcommand 'fetch' for copying files or dirs from target hosts to local HOT 2
- Add flag '-t/--tmp-dir' for subcommand 'fetch'
- Subcommand 'fetch' supports using flag '-s/--run.sudo' to copy files and directories to which the user does not have access permission.
- Hide global flags that are not used by some subcommands
- Default 'completion' command description is inconsistent with others
- Optimize the order of flags to make them more friendly
- 'gossh vault encrypt' get plaintext that to be encrypted from prompt HOT 2
- [Plan]Add command 'encrypt-file' and 'decrypt-file' for 'vault' HOT 1
- add feature to provide different username & passwords/keys for servers HOT 2
- File that from '-V, --auth.vault-pass-file' can also be an executable script
- [Plan] Support group hosts, group vars and group combination in inventory file(hosts file) HOT 1
- Add documentation on how to use each subcommand of the tool
- Optimize the priority of the ssh authentication methods
- Increase files transfer efficiency for subcommand `fetch` HOT 1
- Add dangerous commands detection feature for subcommand `command` and `script` HOT 1
- AIX make crashed - undefined: fsnotify.Watcher HOT 2
- chdir: error retrieving current directory: getcwd: cannot access parent directories HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gossh.