Created
February 20, 2019 15:01
-
-
Save questsin/c99b5f1f8a0efc79cb488252eb96bd09 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
########################## | |
# fetch_pres_log.sh - | |
# script to download the access_logs from | |
# the rPVR webserver. | |
########################## | |
# SSH Configuration Note | |
# ------------------------------------------------------------------- | |
# The host alias, username and SSH key identity file are all configured | |
# under the infrmtca user's ~/.ssh/config file. For completeness, we | |
# document the configuration here. | |
# Host pres1 | |
# Hostname 192.168.164.164 | |
# User ossreport | |
# IdentityFile id_dsa_rpvr | |
# Host pres2 | |
# Hostname 192.168.164.170 | |
# User ossreport | |
# IdentityFile id_dsa_rpvr | |
# | |
HOSTS='pres1 pres2' | |
SRCFILE=/var/log/httpd/access_log | |
DESTDIR=/home/prod_domain/infa_shared/rPVR/data | |
STAMP=`/bin/date +%Y%m%d%H%M%S` | |
for host in $HOSTS; do | |
scp $host:$SRCFILE $DESTDIR/access_log_${host} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment