2008. 3. 27.

[Linux] ftp shell script

#!/bin/sh

## 소스 백업 2007. 7. 21

# 소스 : /app1/cvsrepo/
# WEB : /supp1/webdocs/
# WAS : /supp1/webapps/

tar cfz `date +%Y%m%d`_webapps.tar.gz /supp1/webapps/

USERNAME=w3sli
PASSWORD=*****
HOST=100.5.100.99

PUT_FILES=`date +%Y%m%d`_webapps.tar.gz
{ echo user $USERNAME $PASSWORD
echo cd /backup1/re_backup/`date +%Y%m%d`/
echo bin
echo put $PUT_FILES
echo bye
} | ftp -n -v $HOST >> /tmp/log

#echo " 백업 성공 "
rm -f `date +%Y%m%d`_webapps.tar.gz

댓글 없음: