Skip to content

Commit

Permalink
Merge tag '2024-11-15_filemode_logrotate' into develop
Browse files Browse the repository at this point in the history
Expand logrotate docs
  • Loading branch information
Steven-Eardley committed Nov 15, 2024
2 parents 93e8b6a + e89b5fe commit 0f099fd
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion deploy/logrotate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
```

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.

0 comments on commit 0f099fd

Please sign in to comment.