Created
December 24, 2013 08:52
-
-
Save spidersea/8110546 to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
RSYNC_ORIGINAL_LOG (){ | |
SET_SERVICE=$1 | |
SEQUENCE=$2 | |
SOURCE_IP=$3 | |
rsync $ORIGINAL_LOG_PATH/${SOURCE_IP}/${SET_SERVICE}.log.${SET_DATE_FROMAT}.gz 10.32.231.97::snowman_original_org/${SET_SERVICE}/${SET_DATE_FROMAT//-/}/${SET_SERVICE}.log.${SET_DATE_FROMAT//-/}-${SEQUENCE}.gz | |
} | |
DIRECTION_IP_LIST=(x.x.x.x x.x.x.x x.x.x.x) | |
LSE_IP_LIST=(x.x.x.x x.x.x.x x.x.x.x x.x.x.x) | |
ORIGINAL_LOG_PATH="/log/snowman/" | |
for m in `seq -w 09 20` | |
do | |
SET_DATE_FROMAT="2013-10-$m" | |
for i in `seq -w 0 $((${#DIRECTION_IP_LIST[*]}-1))` | |
do | |
RSYNC_ORIGINAL_LOG directions $i ${DIRECTION_IP_LIST[$i]} | |
done | |
for i in `seq -w 0 $((${#LSE_IP_LIST[*]}-1))` | |
do | |
RSYNC_ORIGINAL_LOG lse $i ${LSE_IP_LIST[$i]} | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment