  | |  | script to back up mysql dababase | script to back up mysql dababase 2005-05-19 - By Christopher McCrory
Back On Wed, 2005-05-18 at 05:58 -0700, Leuy Eeelyu wrote: > > In: /home/tong/.my.cnf > > [client] > > user=root > > password=your.passwd > > > > > > chmod 600 /home/tong/.my.cnf # ;) > > > > try again, yes? > > Ya..it works, now I found I don't need password when > executing > > mysqlhotcopy bugs /home/tong > > or mysqldump bugs > /home/tong/bugs.bak > > or mysqlhotcopy doesn't make anything different than > mysqldump right? why we need this command ?? >
no. mysqldump (and you probably want to add something like --add-drop- table --master-data --opt) will generate the text of the entire database. run: 'less bugs.bak' and you will see all your data.
mysqlhotcopy locks write access the all the tables in the database and copies the table.{MYD,MYI,frm} _files_, like: bug_group_map.MYD bug_group_map.MYI bug_group_map.frm
what you get is a snapshot copy of the binary files.
A major difference is in restoring the data.
mysql -u root < bugs.bak #can take a LONG time vs. cp /backups/mysql/bugs/* /databases/mysql/bugs/ #quick
> > > > > > __ ____ ____ ____ ____ ____ ______ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ > > -- > Taroon-list mailing list > Taroon-list@(protected) > http://www.redhat.com/mailman/listinfo/taroon-list -- Christopher McCrory "The^W One of the guys that keeps the servers running"
chrismcc@(protected) http://www.pricegrabber.com
Let's face it, there's no Hollow Earth, no robots, and no 'mute rays.' And even if there were, waxed paper is no defense. I tried it. Only tinfoil works.
-- Taroon-list mailing list Taroon-list@(protected) http://www.redhat.com/mailman/listinfo/taroon-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |