From e89b5fedaa42c727a6492ddbfaf592e70b5aab67 Mon Sep 17 00:00:00 2001 From: Steven Eardley Date: Fri, 15 Nov 2024 14:32:24 +0000 Subject: [PATCH] expand logrotate documentation --- deploy/logrotate/README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/deploy/logrotate/README.md b/deploy/logrotate/README.md index ec163fd12a..2ef592ccad 100644 --- a/deploy/logrotate/README.md +++ b/deploy/logrotate/README.md @@ -30,4 +30,32 @@ Log uploads can be checked on the S3 bucket with the following command: ``` aws --profile doaj-nginx-logs s3 ls s3://doaj-nginx-logs -``` \ No newline at end of file +``` + +You can try a test run of `logrotate`: + +``` +sudo /usr/sbin/logrotate /etc/logrotate.conf +``` + +Or sync the files by directly running: + +``` +HOSTNAME=`hostname` sudo aws --profile doaj-nginx-logs s3 sync /var/log/nginx/ s3://doaj-nginx-logs/$HOSTNAME/ --exclude "*" --include "doaj.*.gz" +``` + + +### Troubleshooting: + +``` +error: nginx:1 duplicate log entry for /var/log/nginx/doaj.access.log +error: found error in file nginx, skipping +``` + +Check whether you've disabled the default nginx configuration + +``` +The config profile (doaj-nginx-logs) could not be found +``` + +Check that root user has access to the AWS credentials and symlink if required. \ No newline at end of file