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 |
---|---|---|
source | string | Complete file name body copy_from example { source => "/path/to/source"; } |
servers | slist | List of servers body copy_from example { servers => { "primary.example.org", "secondary.example.org", "tertiary.other.domain" }; } |
check_root | true, false | When copying recursively, setting this true will cause the source root's permissions to be applied to the destination root. |
collapse_destination_dir | true, false | If copying recursively, does the destination collapse all files into a single directory? Default (false) is to preserve the source directory structure. |
compare | atime, mtime, ctime, digest/hash, exists, binary | How 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_backup | true, false, timestamp | Should a back-up copy be kept? See also the repository item on the Files stanza page. |
copylink_patterns | slist | List of patterns matching files that should be linked instead of copied. body copy_from example { copylink_patterns => { "special_?", "other.*" }; } |
copy_size | int range: 0-inf | Range of allowable sizes to limit selection. body copy_from example { copy_size => irange("0","50000"); } |
encrypt | true, false | Encrypt network communication with Blowfish. |
findertype | menu item: MacOSX | Default finder type on Mac O/S X. |
linkcopy_patterns | slist | List of patterns matching files that should be replaced with symbolic links. body copy_from mycopy(from) { source => "$(from)"; linkcopy_patterns => { ".*" }; } |
link_type | symlink, hardlink, relative, absolute, none | Type of file link. Only hard links are supported in Windows. |
force_update | true, false | Always copy the file, even if Cfengine thinks it does not need copying. Docs say this is non-convergent and to avoid it. |
force_ipv4 | true, false | Force use of IPv4 on an IPv6-enabled network. |
portnumber | int 1024-99999 (5308) | Cfengine port number on the server. Standard is 5308. |
preserve | true, false | Whether to preserve file permissions on copied file. |
purge | true, false | Purge files on client that do not match files on server when a depth_search is used, like using –del option with rsync. |
stealth | true, false | Whether to preserve time stamps on copied file(s). |
timeout | int 1-3600 | Connection timeout in seconds. |
trustkey | true, false | Trust 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_check | true, false | Compare file types before copying and require match. (docs don't say whether default is true or false.) |
verify | true, false | Verify transferred file by hashing after copy (careful: this has a high CPU cost on large files). |