#!/bin/bash

#DESC With QA in mind. Copy /usr2/bbx from one server to another.
#PRDno

TARGET=$2

[ "$TARGET" == "" ] && echo -n "Enter target IP: " && read TARGET

ping -c 1 $TARGET
[ "$?" != "0" ] && echo "Target unavalible." && exit 1

rsync -avz --exclude '*.prepatch*' --exclude '*.tar' --exclude '*.zip' --exclude '*pre*' --exclude '.*' --exclude '*orig*' --exclude '*.bak*' --exclude '*.log' /usr2/bbx tfsupport@${TARGET}:/usr2/
