salt-cp.1 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SALT-CP" "1" "Apr 25, 2019" "2019.2.0-301-g6c02054" "Salt"
  4. .SH NAME
  5. salt-cp \- salt-cp Documentation
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .sp
  34. Copy a file or files to one or more minions
  35. .SH SYNOPSIS
  36. .INDENT 0.0
  37. .INDENT 3.5
  38. .sp
  39. .nf
  40. .ft C
  41. salt\-cp \(aq*\(aq [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST
  42. salt\-cp \-E \(aq.*\(aq [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST
  43. salt\-cp \-G \(aqos:Arch.*\(aq [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST
  44. .ft P
  45. .fi
  46. .UNINDENT
  47. .UNINDENT
  48. .SH DESCRIPTION
  49. .sp
  50. salt\-cp copies files from the master to all of the Salt minions matched by the
  51. specified target expression.
  52. .sp
  53. \fBNOTE:\fP
  54. .INDENT 0.0
  55. .INDENT 3.5
  56. salt\-cp uses Salt\(aqs publishing mechanism. This means the privacy of the
  57. contents of the file on the wire is completely dependent upon the transport
  58. in use. In addition, if the master or minion is running with debug logging,
  59. the contents of the file will be logged to disk.
  60. .sp
  61. In addition, this tool is less efficient than the Salt fileserver when
  62. copying larger files. It is recommended to instead use
  63. \fBcp.get_file\fP to copy larger files to
  64. minions. However, this requires the file to be located within one of the
  65. fileserver directories.
  66. .UNINDENT
  67. .UNINDENT
  68. .sp
  69. Changed in version 2016.3.7,2016.11.6,2017.7.0: Compression support added, disable with \fB\-n\fP\&. Also, if the destination
  70. path ends in a path separator (i.e. \fB/\fP, or \fB\e\fP on Windows, the
  71. desitination will be assumed to be a directory. Finally, recursion is now
  72. supported, allowing for entire directories to be copied.
  73. .sp
  74. Changed in version 2016.11.7,2017.7.2: Reverted back to the old copy mode to preserve backward compatibility. The
  75. new functionality added in 2016.6.6 and 2017.7.0 is now available using the
  76. \fB\-C\fP or \fB\-\-chunked\fP CLI arguments. Note that compression, recursive
  77. copying, and support for copying large files is only available in chunked
  78. mode.
  79. .SH OPTIONS
  80. .INDENT 0.0
  81. .TP
  82. .B \-\-version
  83. Print the version of Salt that is running.
  84. .UNINDENT
  85. .INDENT 0.0
  86. .TP
  87. .B \-\-versions\-report
  88. Show program\(aqs dependencies and version number, and then exit
  89. .UNINDENT
  90. .INDENT 0.0
  91. .TP
  92. .B \-h, \-\-help
  93. Show the help message and exit
  94. .UNINDENT
  95. .INDENT 0.0
  96. .TP
  97. .B \-c CONFIG_DIR, \-\-config\-dir=CONFIG_dir
  98. The location of the Salt configuration directory. This directory contains
  99. the configuration files for Salt master and minions. The default location
  100. on most systems is \fB/etc/salt\fP\&.
  101. .UNINDENT
  102. .INDENT 0.0
  103. .TP
  104. .B \-t TIMEOUT, \-\-timeout=TIMEOUT
  105. The timeout in seconds to wait for replies from the Salt minions. The
  106. timeout number specifies how long the command line client will wait to
  107. query the minions and check on running jobs. Default: 5
  108. .UNINDENT
  109. .SS Logging Options
  110. .sp
  111. Logging options which override any settings defined on the configuration files.
  112. .INDENT 0.0
  113. .TP
  114. .B \-l LOG_LEVEL, \-\-log\-level=LOG_LEVEL
  115. Console logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
  116. \fBdebug\fP, \fBinfo\fP, \fBwarning\fP, \fBerror\fP, \fBquiet\fP\&. Default:
  117. \fBwarning\fP\&.
  118. .UNINDENT
  119. .INDENT 0.0
  120. .TP
  121. .B \-\-log\-file=LOG_FILE
  122. Log file path. Default: /var/log/salt/master\&.
  123. .UNINDENT
  124. .INDENT 0.0
  125. .TP
  126. .B \-\-log\-file\-level=LOG_LEVEL_LOGFILE
  127. Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
  128. \fBdebug\fP, \fBinfo\fP, \fBwarning\fP, \fBerror\fP, \fBquiet\fP\&. Default:
  129. \fBwarning\fP\&.
  130. .UNINDENT
  131. .SS Target Selection
  132. .sp
  133. The default matching that Salt utilizes is shell\-style globbing around the
  134. minion id. See \fI\%https://docs.python.org/2/library/fnmatch.html#module\-fnmatch\fP\&.
  135. .INDENT 0.0
  136. .TP
  137. .B \-E, \-\-pcre
  138. The target expression will be interpreted as a PCRE regular expression
  139. rather than a shell glob.
  140. .UNINDENT
  141. .INDENT 0.0
  142. .TP
  143. .B \-L, \-\-list
  144. The target expression will be interpreted as a comma\-delimited list;
  145. example: server1.foo.bar,server2.foo.bar,example7.quo.qux
  146. .UNINDENT
  147. .INDENT 0.0
  148. .TP
  149. .B \-G, \-\-grain
  150. The target expression matches values returned by the Salt grains system on
  151. the minions. The target expression is in the format of \(aq<grain value>:<glob
  152. expression>\(aq; example: \(aqos:Arch*\(aq
  153. .sp
  154. This was changed in version 0.9.8 to accept glob expressions instead of
  155. regular expression. To use regular expression matching with grains, use
  156. the \-\-grain\-pcre option.
  157. .UNINDENT
  158. .INDENT 0.0
  159. .TP
  160. .B \-\-grain\-pcre
  161. The target expression matches values returned by the Salt grains system on
  162. the minions. The target expression is in the format of \(aq<grain value>:<
  163. regular expression>\(aq; example: \(aqos:Arch.*\(aq
  164. .UNINDENT
  165. .INDENT 0.0
  166. .TP
  167. .B \-N, \-\-nodegroup
  168. Use a predefined compound target defined in the Salt master configuration
  169. file.
  170. .UNINDENT
  171. .INDENT 0.0
  172. .TP
  173. .B \-R, \-\-range
  174. Instead of using shell globs to evaluate the target, use a range expression
  175. to identify targets. Range expressions look like %cluster.
  176. .sp
  177. Using the Range option requires that a range server is set up and the
  178. location of the range server is referenced in the master configuration
  179. file.
  180. .UNINDENT
  181. .INDENT 0.0
  182. .TP
  183. .B \-C, \-\-chunked
  184. Use new chunked mode to copy files. This mode supports large files, recursive
  185. directories copying and compression.
  186. .sp
  187. New in version 2016.11.7,2017.7.2.
  188. .UNINDENT
  189. .INDENT 0.0
  190. .TP
  191. .B \-n, \-\-no\-compression
  192. Disable gzip compression in chunked mode.
  193. .sp
  194. New in version 2016.3.7,2016.11.6,2017.7.0.
  195. .UNINDENT
  196. .SH SEE ALSO
  197. .sp
  198. \fBsalt(1)\fP
  199. \fBsalt\-master(1)\fP
  200. \fBsalt\-minion(1)\fP
  201. .SH AUTHOR
  202. Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
  203. .\" Generated by docutils manpage writer.
  204. .