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