SALT-CP(1) | Salt | SALT-CP(1) |
salt-cp - salt-cp Documentation
Copy a file or files to one or more minions
salt-cp '*' [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST salt-cp -E '.*' [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST salt-cp -G 'os:Arch.*' [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST
salt-cp copies files from the master to all of the Salt minions matched by the specified target expression.
NOTE:
In addition, this tool is less efficient than the Salt fileserver when copying larger files. It is recommended to instead use cp.get_file to copy larger files to minions. However, this requires the file to be located within one of the fileserver directories.
Changed in version 2016.3.7,2016.11.6,2017.7.0: Compression support added, disable with -n. Also, if the destination path ends in a path separator (i.e. /, or \ on Windows, the desitination will be assumed to be a directory. Finally, recursion is now supported, allowing for entire directories to be copied.
Changed in version 2016.11.7,2017.7.2: Reverted back to the old copy mode to preserve backward compatibility. The new functionality added in 2016.6.6 and 2017.7.0 is now available using the -C or --chunked CLI arguments. Note that compression, recursive copying, and support for copying large files is only available in chunked mode.
Logging options which override any settings defined on the configuration files.
The default matching that Salt utilizes is shell-style globbing around the minion id. See https://docs.python.org/2/library/fnmatch.html#module-fnmatch.
This was changed in version 0.9.8 to accept glob expressions instead of regular expression. To use regular expression matching with grains, use the –grain-pcre option.
Using the Range option requires that a range server is set up and the location of the range server is referenced in the master configuration file.
New in version 2016.11.7,2017.7.2.
New in version 2016.3.7,2016.11.6,2017.7.0.
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
November 18, 2021 | 2018.3.4 |