backup script
Hello,
I have a small script for backing up website data. The following is the script
# eg : sourcedir="/usr/local/psa/home/vhosts"
#sourcedir="Put in the path of the source folder"
sourcedir="/home/robinson/temp/test"
# eg : backupdir="/backupdrive"
#backupdir="Put in the path of the destination folder"
backupdir="/home/robinson/temp/dest"
for i in `ls $sourcedir`
do
tar -cpzf $backupdir/$i.tar.gz $sourcedir/$i --exclude "$sourcedir/logs"
done
Can anybody tell me how will the above script work.
Regards
Nitesh
|