Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ apk add --allow-untrusted dist/prec_*_x86_64.apk
pacman -U dist/prec-*-x86_64.pkg.tar.zst
```

Package installs place `/etc/logrotate.d/prec` with a default policy of `daily` and `rotate 7305` (about 20 years of retention).
Adjust the `rotate` value as needed to match your retention policy.

### Manual install from source

Build the binaries first:
Expand Down Expand Up @@ -173,6 +176,9 @@ install -m 0640 packaging/systemd/precd.service /usr/lib/systemd/system/
install -m 0640 packaging/logrotate/prec /etc/logrotate.d/prec
```

The installed `/etc/logrotate.d/prec` default is `daily` with `rotate 7305` (about 20 years of retention).
Adjust the `rotate` value as needed to match your retention policy.

### Enable and start precd

```bash
Expand Down
6 changes: 4 additions & 2 deletions packaging/logrotate/prec
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/var/log/prec/prec.log {
# daily
# rotate 90
daily
# Retain logs for up to 20 years by default.
# Adjust this value to match your organization's retention policy.
rotate 7305
# Log compression is enabled by default (compress = "zstd" in precd.conf),
# so compressed rotated log files cannot be read with --all-logs.
# If compress = "no" is set in precd.conf, using compress here is recommended.
Expand Down