SALT-CP(1)
π SALT-CP(1) π
okay bestie, welcome to salt-cp β like, the whole manual, but make it make sense. this is salt-cp from the Salt fam, and yes she is that girl. π
β¨ NAME β¨
salt-cp β salt-cp documentation, and also the vibe where you copy a file or files to one or more minions. no cap, that's literally the whole job. π¦
πΈ SYNOPSIS πΈ
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
three lil fits, pick your fave. π
π DESCRIPTION π
so here's the tea: salt-cp copies files from the master to all of the Salt minions matched by whatever target expression you gave it. that's it, that's the plot. β¨
NOTE: β οΈ bestie, listen. salt-cp uses Salt's publishing mechanism. that means the privacy of the contents of the file on the wire is completely dependent upon the transport in use. and also β if the master or minion is running with debug logging, the contents of the file will be logged to disk. like, the whole file. in a log. be aware. π
also, real talk: this tool is less efficient than the Salt fileserver when copying larger files. the glow-up recommendation is to use cp.get_file instead to copy larger files to minions. the catch? that requires the file to be located within one of the fileserver directories. so, trade-offs, iykyk. π
Changed in version 2016.3.7,2016.11.6,2017.7.0: compression support got added, disable it with -n. also, if the destination path ends in a path separator (i.e. /, or \ on Windows), the destination will be assumed to be a directory. and finally, recursion is now supported, allowing for entire directories to be copied. we love a glow-up. π§
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. so if you want the fancy stuff, you gotta opt in. periodt. π
π OPTIONS π
the menu. order up. π
--versionβ print the version of Salt that is running. slay, now you know.--versions-reportβ show program's dependencies and version number, and then exit. a whole lil report card. π-h,--helpβ show the help message and exit. when in doubt, ask for help, that's self-care.-c CONFIG_DIR,--config-dir=CONFIG_dirβ the location of the Salt configuration directory. this directory contains the configuration files for Salt master and minions. the default location on most systems is/etc/salt.-t TIMEOUT,--timeout=TIMEOUTβ the timeout in seconds to wait for replies from the Salt minions. the timeout number specifies how long the command line client will wait to query the minions and check on running jobs. Default:5
π Logging Options π
logging options which override any settings defined on the configuration files. your config said one thing, your CLI said another, CLI wins. π
-l LOG_LEVEL,--log-level=LOG_LEVELβ console logging log level. one ofall,garbage,trace,debug,info,warning,error,quiet. Default:warning.--log-file=LOG_FILEβ log file path. Default:/var/log/salt/master.--log-file-level=LOG_LEVEL_LOGFILEβ logfile logging log level. one ofall,garbage,trace,debug,info,warning,error,quiet. Default:warning.
π― Target Selection π―
the default matching that Salt utilizes is shell-style globbing around the minion id. see https://docs.python.org/3/library/fnmatch.html#module-fnmatch. cute, right? π
-E,--pcreβ the target expression will be interpreted as a PCRE regular expression rather than a shell glob. regex girlies rise. π₯-L,--listβ the target expression will be interpreted as a comma-delimited list; example:server1.foo.bar,server2.foo.bar,example7.quo.qux-G,--grainβ the target expression matches values returned by the Salt grains system on the minions. the target expression is in the format of'<grain value>:<glob expression>'; example:'os:Arch*'
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.
--grain-pcreβ the target expression matches values returned by the Salt grains system on the minions. the target expression is in the format of'<grain value>:< regular expression>'; example:'os:Arch.*'-N,--nodegroupβ use a predefined compound target defined in the Salt master configuration file.-R,--rangeβ instead of using shell globs to evaluate the target, use a range expression to identify targets. range expressions look like%cluster.
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. no range server, no range. π
-C,--chunkedβ use new chunked mode to copy files. this mode supports large files, recursive directories copying and compression.
New in version 2016.11.7,2017.7.2.
-n,--no-compressionβ disable gzip compression in chunked mode.
New in version 2016.3.7,2016.11.6,2017.7.0.
π SEE ALSO π
salt(1) salt-master(1) salt-minion(1)
the friend group. go say hi. π«Ά
βοΈ AUTHOR βοΈ
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file. shoutout to the whole squad, fr fr. π
Β©οΈ COPYRIGHT Β©οΈ
2025
and that's the whole page, bestie β you ate that π β¨
version 3007.8, generated on September 18, 2025 at 06:58:52 UTC. that's the tea, drink up. ππ¦β
π¦ where this page comes from
- fedora 44: salt-master 3007.8-4.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms