diff --git a/FAQ.md b/FAQ.md index 219bb0dc..ee2d705b 100644 --- a/FAQ.md +++ b/FAQ.md @@ -143,3 +143,8 @@ General Note that after registering a delayed standby, `repmgrd` will only start once the metadata added in the master node has been replicated. + +- How can I get `repmgrd` to rotate its logfile? + + Configure your system's `logrotate` service to do this; see example + in README.md diff --git a/README.md b/README.md index db456ad2..31500409 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,20 @@ Example log output (at default log level): [2015-03-11 13:15:40] [INFO] reloading configuration file and updating repmgr tables [2015-03-11 13:15:40] [INFO] starting continuous standby node monitoring +Note that currently `repmgrd` does not provide logfile rotation. To ensure +the current logfile does not grow indefinitely, configure your system's `logrotate` +to do this. Sample configuration to rotate logfiles weekly with retention +for up to 52 weeks and rotation forced if a file grows beyond 100Mb: + + /var/log/postgresql/repmgr-9.4.log { + missingok + compress + rotate 52 + maxsize 100M + weekly + create 0600 postgres postgres + } + Witness server --------------