Trace: copy_from

copy_from

back to Files page

copy_from

List of all parameters for the copy_from command of a “files” section in a Cfengine 3 agent bundle.

Default values are underlined.

Directive Type Description & Example
sourcestringComplete file name
body copy_from example {
 source => "/path/to/source";
 }
serversslistList of servers
body copy_from example {
 servers => {
   "primary.example.org",
   "secondary.example.org",
   "tertiary.other.domain" };
 }
check_roottrue, falseWhen copying recursively, setting this true will cause the source root's permissions to be applied to the destination root.
collapse_destination_dirtrue, falseIf copying recursively, does the destination collapse all files into a single directory? Default (false) is to preserve the source directory structure.
compareatime, mtime, ctime, digest/hash, exists, binaryHow to determine whether a file needs to be copied: By atime, mtime, or ctime? By its hash (a.k.a. digest)? Simply whether it already exists? Or a byte-for-byte binary comparison?
copy_backuptrue, false, timestampShould a back-up copy be kept? See also the repository item on the Files stanza page.
copylink_patternsslistList of patterns matching files that should be linked instead of copied.
body copy_from example {
 copylink_patterns => { "special_?", "other.*" };
 }
copy_sizeint range: 0-infRange of allowable sizes to limit selection.
body copy_from example {
 copy_size => irange("0","50000");
 }
encrypttrue, falseEncrypt network communication with Blowfish.
findertypemenu item: MacOSXDefault finder type on Mac O/S X.
linkcopy_patternsslistList of patterns matching files that should be replaced with symbolic links.
body copy_from mycopy(from) {
 source            => "$(from)";
 linkcopy_patterns => { ".*" };
 }
link_typesymlink, hardlink, relative, absolute, noneType of file link. Only hard links are supported in Windows.
force_updatetrue, falseAlways copy the file, even if Cfengine thinks it does not need copying. Docs say this is non-convergent and to avoid it.
force_ipv4true, falseForce use of IPv4 on an IPv6-enabled network.
portnumberint 1024-99999 (5308)Cfengine port number on the server. Standard is 5308.
preservetrue, falseWhether to preserve file permissions on copied file.
purgetrue, falsePurge files on client that do not match files on server when a depth_search is used, like using –del option with rsync.
stealthtrue, falseWhether to preserve time stamps on copied file(s).
timeoutint 1-3600Connection timeout in seconds.
trustkeytrue, falseTrust public keys from remote server if previously unknown. Most important on the server side, clients are quite safe to set to 'true' since they probably talk to only one or two servers and they will know their keys on the first run of Cfengine.
type_checktrue, falseCompare file types before copying and require match. (docs don't say whether default is true or false.)
verifytrue, falseVerify transferred file by hashing after copy (careful: this has a high CPU cost on large files).