Skip to content
Snippets Groups Projects
rsync_logs.sh 502 B
Newer Older
  • Learn to ignore specific revisions
  • kohleman's avatar
    kohleman committed
    #!/bin/bash
    
    # saves the auth and usage logs of openBIS and DSS logs
    
    kohleman's avatar
    kohleman committed
    
    
    export TOMCAT_LOGS=~openbis/sprint/openBIS-server/apache-tomcat/logs
    export DSS_LOGS=~openbis/sprint/datastore_server/log
    
    kohleman's avatar
    kohleman committed
    export RSYNC=/usr/bin/rsync
    
    kohleman's avatar
    kohleman committed
    export DESTINATION=~openbis/logs
    
    kohleman's avatar
    kohleman committed
    
    [ -d $DESTINATION ] || mkdir -p $DESTINATION
    
    $RSYNC -av $TOMCAT_LOGS/*auth* $DESTINATION
    $RSYNC -av $TOMCAT_LOGS/*usage* $DESTINATION
    
    kohleman's avatar
    kohleman committed
    $RSYNC -av $DSS_LOGS/* $DESTINATION
    
    if [ -f $DESTINATION/check_logins.sh ]; then
    	$DESTINATION/check_logins.sh
    fi