Comments (2)
Subcommand fetch
first version usage show:
$ gossh fetch -h
Copy files/dirs from target hosts to local.
Usage:
gossh fetch [flags]
Examples:
# Copy host1:/path/foo to local /tmp/backup/host1/path/foo.
$ gossh fetch host1 -f /path/foo -d /tmp/backup
# Copy files and dirs from target hosts to local dir /tmp/backup/,
# and files in local dir /tmp/backup/ would be:
# /tmp/backup/host1/path1/foo.txt
# /tmp/backup/host1/path2/bar/
# /tmp/backup/host2/path1/foo.txt
# /tmp/backup/host2/path2/bar/
#
$ gossh fetch host1 host2 -f /path1/foo.txt -f /path2/bar/ -d /tmp/backup
or
$ gossh fetch host1 host2 -f /path1/foo.txt,/path2/bar/ -d /tmp/backup
Flags:
-d, --dest-path string local directory that files/dirs from target hosts will be copied to
-f, --files strings files/dirs on target hosts that to be copied
-h, --help help for fetch
Global Flags:
-k, --auth.ask-pass ask for password of login user
-a, --auth.file string file containing the credentials (format: "username:password")
-i, --auth.identity-files strings identity files (default $HOME/.ssh/{id_rsa,id_dsa})
-K, --auth.passphrase string passphrase of the identity files
-p, --auth.password string password of the login user
-u, --auth.user string login user (default $USER)
--config string config file (default {$PWD,$HOME}/.gossh.yaml)
-H, --hosts.file string file containing target hosts (format: one host/pattern per line)
-L, --hosts.list outputs a list of target hosts, and does not do anything else
-P, --hosts.port int port of target hosts (default 22)
-C, --output.condense condense output and disable color
-o, --output.file string file to which messages are output
-j, --output.json output messages in json format
-q, --output.quiet do not output messages to screen (except error messages)
-v, --output.verbose show debug messages
--proxy.identity-files strings identity files for proxy (default same as 'auth.identity-files')
--proxy.passphrase string passphrase of the identity files for proxy
(default same as 'auth.passphrase')
--proxy.password string password for proxy (default same as 'auth.password')
--proxy.port int proxy server port (default 22)
-X, --proxy.server string proxy server address
--proxy.user string login user for proxy (default same as 'auth.user')
-U, --run.as-user string run via sudo as this user (default "root")
-c, --run.concurrency int number of concurrent connections (default 1)
-l, --run.lang string specify i18n while executing command (e.g. zh_CN.UTF-8|en_US.UTF-8)
-s, --run.sudo use sudo to execute commands/script
--timeout.command int timeout seconds for executing commands/script on each target host
or copying local files and dirs to each target host
or copying files and dirs from each target host to local
--timeout.conn int timeout seconds for connecting each target host (default 10)
--timeout.task int timeout seconds for the current gossh task
from gossh.
Add fetch
demo screenshot:
- Success(at least one file or dir is valid):
- Failed(all files or dirs not exist):
- Failed(all files or dirs no permission):
- Failed(command 'zip' not installed on target hosts):
from gossh.
Related Issues (20)
- The outputs that were originally 'FAILED' was marked as 'SUCCESS'
- Optimize log formats(that not in json format)
- 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 `push` HOT 4
- 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.