1. vi dump_all_table_schema.sh
2. 用for迴圈去抓出3個DB name,dump出這3個DB的table schema
#!/bin/sh
echo start `date '+%Y%m%d %H%M%S'`
DIR=/mysql/mysql_dump
FIL=_schema
for DB in db_name_1 db_name_2 db_name_3
do
/usr/local/bin/mysqldump -uaccount -ppassword --no-data $DB > $DIR/$DB$FIL.txt
done
echo start `date '+%Y%m%d %H%M%S'`
沒有留言:
張貼留言