#!/bin/bash

BackupDir=/export/home/sqwen/data
TargetDir=/export/home/sqwen/backupdata

DateFile=`date +%y%m%d`
cd $BackupDir
cd ..
tar cvfz ${DateFile}.tgz $(basename $BackupDir)
mv ${DateFile}.tgz $TargetDir