#!/bin/bash
if [ -z "$1" ]; then
    echo 'please input Tax Number';
    exit;
fi
echo $1;
BAK=`date +"%Y-%m-%d"`
echo $BAK
tar -acvf /home/Sites/apps/$1_$BAK.tgz /home/Sites/apps/$1
mysqldump einv_$1 -u root -pmy551sql > /home/Sites/apps/$1_$BAK.sql
gzip /home/Sites/apps/$1_$BAK.sql
rm /home/Sites/apps/$1 -fR
mysqladmin drop einv_$1 -u root -pmy551sql -f
