본문 바로가기

etc

shell

반응형
http://home.zany.kr:9003/board/bView.asp?bCode=11&aCode=2553
 

#!/bin/bash
export PATH
export LANG=ko_KR.UTF-8
export WORK_DIR=~events/crontab_db
export DUMP_DIR=~events/database_dump

DATE_STRING=$(date +%Y%m%d_%H%M);
DUMP_FILE=EventNJoy_MySql_Dump_Full_$DATE_STRING.sql;

date "+%Y-%m-%d %H:%M:%S EXECUTE MySQL Backup PROCESS" >> $WORK_DIR/run_mysql_backup.log
mysqldump \
--socket=/tmp/mysql.sock2 \
--triggers \
--routines \
--host=localhost \
--user=events \
--password=dlqpscm09 \
--database events > $DUMP_DIR/$DUMP_FILE;gzip $DUMP_DIR/$DUMP_FILE &

반응형

'etc' 카테고리의 다른 글

화장품  (0) 2011.08.28
Tomcat setting  (0) 2011.08.27
random AccessFile  (0) 2011.08.22
ImageJ  (0) 2011.08.18
Test, communication  (0) 2011.08.17