>DBS="genldgr ap ar corp misc"
>DUMP=$HOME/archive/dump
>
>cd $DUMP
>
>DIR=`date | cut -d" " -f1`
>mkdir -p $DIR
>rm -f Today
>ln -sf $DIR Today
>cd $DIR
>for K in $DBS
>do
> TBLS=`mysql -N -e "show tables" $K`
> for I in $TBLS
> do
> mysql -e "repair table $I" $K
> mysqldump -q --add-drop-table $K $I >> $K.$I.dmp
> rm -rf $K.$I.dmp.gz
> gzip $K.$I.dmp
> done
>done
>
>Regards,
>--
>Don Read [EMAIL PROTECTED]
Thanks for posting this, Don. I got a lot out of it.
Nothing like seeing a good example of commands actually being used. Much appreciated.
/Rob
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert Alexander ~~ Programmer/Analyst/DBA/Admin
WWW Database Applications ~~ http://www.ra1.net
Web Software and Hosting ~~ http://www.workmate.ca
"The edifice of civil rights has degenerated into a
naked spoils system. ... laws have come close to
outlawing undesired thought. The iron rule of
political correctness has distinct resemblance to
Soviet-style social control. Much of this is imposed
less by the official government than by the meta-
government of academia, media, and Hollywood. Yet
it's there." -- Fred Reed
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php