help text for juju scp needs improving
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Reed O'Brien |
Bug Description
Usage: juju scp [options] <file> [<user>
Summary:
Transfers files to/from a Juju machine.
Options:
-m, --model (= "")
Model to operate in
--proxy (= true)
Proxy through the API server
--pty (= true)
Enable pseudo-tty allocation
Details:
The usage is for transferring files from the client to a Juju machine. To do the reverse:
juju scp [options] [<user>
and use quotes when multiple files are involved.
The machine is identified by the <target> argument which is either a 'unit name' or a 'machine id'. Both are obtained in the output from `juju status`: unit name in the [Units] section and machine id in the [Machines] section.
If 'user' is specified then the connection is made to that user account; otherwise, the 'ubuntu' account is used.
'file' can be single or multiple files or directories. For directories, you must use the scp option of '-r'.
Options specific to scp can be inserted between 'scp' and '[options]' with '-- <scp-options>'. Refer to the scp(1) man page for an explanation of those options.
Examples:
Copy file /var/log/syslog from machine 2 to the client's current working directory:
juju scp 2:/var/log/syslog .
Copy directory /var/log/mongodb, recursively, from a mongodb unit
to the client's local directory remote-logs:
juju scp -- -r mongodb/
Copy file foo.txt, in verbose mode, from the client's current working directory to an apache2 unit of model "mymodel":
juju scp -- -v -m mymodel foo.txt apache2/1:
Copy multiple files from the client's current working directory to machine 2:
juju scp file1 file2 2:
Copy multiple files from the bob user account on machine 3 to the client's current working directory:
juju scp bob@3:'file1 file2' .
See also: ssh
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 2.0-beta4 |
Changed in juju-core: | |
milestone: | 2.0-beta4 → 2.0-rc1 |
Changed in juju-core: | |
status: | Triaged → In Progress |
assignee: | nobody → Reed O'Brien (reedobrien) |
description: | updated |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0-beta5 → none |
milestone: | none → 2.0-beta5 |
Usage here is multiline, and has content between the subcommand (scp) and [options]. Usage is dynamically generated and I am not sure exactly how to change it in this case without rewriting the juju/cmd package.
Please advise.