#!/bin/bash
while read line
do
ip=`echo $line|awk -F ':' '{print $1}'`
path_list=`echo $line|awk -F ':' '{print $2}'`
mkdir -p /data/Backup_data/$ip/
ssh -n $ip 'find '$path_list' -type f -name "*.sh" -or -name "*.py" -or -name "*.plx" -or -name "*.pl" -or -name "*.perl" -or -name "*.pm" |xargs tar zcf /tmp/data_backup.tar.gz '
scp $ip:/tmp/data_backup.tar.gz /data/Backup_data/$ip/data_backup`date +%Y%m%d`.tar.gz
done < /opt/scripts/backup_data/data_path.confbash