corz.org uses cookies to remember that you've seen this notice explaining that corz.org uses cookies, okay!
corz.org text viewer..
[currently viewing: / public/ linux/ usr/ local/ bin/ bup.sh - raw]
HOST="domain.org"
USER="UserName"
PASSWD="MyPassW0rd"
LOCAL="/home/MyFolder"
REMOTE="/public_html"
BAX="/bax/www"
NOW=`date "+%Y.%m.%d-%H.%M"`
echo
echo "corzblog update script.."
echo
echo "archiving old blog folders.."
mkdir $BAX/cb
cp -R $LOCAL/blogbsp;$BAX/cb
rm -rf $BAX/cb/arc $BAX/cb/img $BAX/cb/audio $BAX/cb/inc/spellingist $BAX/cb/incip
cd $BAX/
tar cfz corzblog-bax-$NOW.tar.gz cb > /dev/null
mv corzblog-bax* $BAX/_arc/blog/
rm -rf $BAX/cb
echo
echo "performing ftp operations.."
ftp -i -n $HOST <<FTP_QUIT
quote USER $USER
quote PASS $PASSWD
ascii
lcd "$LOCAL/blog"
cd "$REMOTE/blog"
mput "*.php"
lcd "$LOCAL/blog/inc"
cd "$REMOTE/blog/inc"
mput "*.php"
lcd "$LOCAL/blog/inc/js"
cd "$REMOTE/blog/inc/js"
mput "*.js"
FTP_QUIT
echo
echo "all done"
echo
exit 0