Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Latest commit 954699a Apr 9, 2024 History
See ukf/ukf-meta#423 for details
1 contributor

Users who have contributed to this file

executable file 32 lines (23 sloc) 1.19 KB
#!/bin/bash
# This script will sync the logfiles from all of the backend servers into a central location on repo
#
# Set some common options
logslocation="/var/stats"
# Logs from API
# Logs from MD servers
rsync -at --exclude modsec* stats@md-ne-01:/var/log/httpd/* $logslocation/md/md-ne-01/
rsync -at --exclude modsec* stats@md-ne-02:/var/log/httpd/* $logslocation/md/md-ne-02/
rsync -at --exclude modsec* stats@md-we-01:/var/log/httpd/* $logslocation/md/md-we-01/
rsync -at --exclude modsec* stats@md-we-02:/var/log/httpd/* $logslocation/md/md-we-02/
# Logs from websites
rsync -at --exclude modsec* stats@www-ne-01:/var/log/httpd/* $logslocation/www/www-ne-01/
rsync -at --exclude modsec* stats@www-we-01:/var/log/httpd/* $logslocation/www/www-we-01/
# Logs from Test IdP
rsync -at --exclude modsec* stats@test-idp:/var/log/httpd/* $logslocation/test-idp/
rsync -at stats@test-idp:/opt/shibboleth-idp/logs/idp-audit* $logslocation/test-idp/
# Logs from Test SP inaccessible once the Test SP migrated to 2024 infrastructure
#
# The Test SP has a cronjob to remove logs with PII > 30 days old, we replicate that in this script
find $logslocation/test-sp/ -type f -mtime +90 -delete
# Exit happily
exit 0