Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions content/reference/promise-types/files/_index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,13 @@ system files, you should keep a single repository for them and use CFEngine to
synchronize changes from the repository source. Repositories should not be
used to attempt to capture random changes of the system.

To produce a diff, the agent keeps its own copy of each monitored file to
compare the next run against. These copies are kept in a tree under
`$(sys.statedir)/change_details` that mirrors the path of the monitored file,
so the copy of `/etc/ssh/sshd_config` is
`/var/cfengine/state/change_details/etc/ssh/sshd_config`. The location is not
configurable, and `repository` does not change it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is repository here? is that a variable somewhere? Do you mean that https://docs.cfengine.com/docs/lts/reference/components/cf-agent/#default_repository does not do what it says and change the default repository location from /var/cfengine/state/change_details to whatever is specified?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curiously the docs say the file is underscored instead of directories created in the repository

Notes: When a repository is specified, the files are stored using the canonified directory name of the original file, concatenated with the name of the file. So, for example, /usr/local/etc/postfix.conf would ordinarily be stored in an alternative repository as _usr_local_etc_postfix.conf.cfsaved. If unset then backups are stored in the same directory as the original file with an identifying suffix.


**Limitations:**
Diffs will not be reported for files that are larger than 80MB in size.
Diffs will not be reported if the number of lines between the first and last change exceed 4500.
Expand All @@ -761,6 +768,12 @@ body changes example
}
```

**History:** Before 3.29.0 the copies were kept next to the monitored file as
`<file>_cfchanges`, or under `repository` if one was configured. On the first
run after an upgrade the copy is moved from either location to
`$(sys.statedir)/change_details`, so no baseline is lost and nothing is left

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so during the upgrade to 3.29.0+ file changes will be moved to change_details from any specified default_repository and default_repository no longer specifies where files are placed?

behind.

#### silence

**Description:** The `silence` attribute lists the categories of file change
Expand Down
Loading