Hi All,

I ve task to take a back up a folder from remote server,i wrote a script for create a file with extent ion of .tar.gz but i got an error is given below in red color font.

servicepath="/etc/httpd/"
service_name="httpd"
country="TW"
cur_date=`date +%d-%m-%Y`
extention="tar.gz"
filename="$service_name-$country-$cur_date-$extention"
`tar -czvf $filename $servicepath`

when i ran this script i got an error like
[root@localhost ~]# sh httpd.sh
tar: Removing leading `/' from member names
httpd.sh: line 7: /etc/httpd/: is a directory
[root@localhost ~]#


Finally i need sloution for that error and a script to copy the tar.gz file in to remote server

Regards,
Hariharan V.