| binary backup [message #2349] |
Fri, 07 December 2007 05:00  |
erkules Messages: 58 Registered: December 2007 |
Member |
|
|
I've got a big database and mysqldumpIng it takes tooo long:-)
I played with tar and rsync and it seems to play well. But Im lacking experience. All I did was a "Flush tables with read lock" and doing a tar/rsync. In the long run I would prefer rsync. But Im not sure, if it is a bad idea.
Are there some experiences. Would you recommend something else for a binary backup? AFAIK no problems with MyISAM-Engine, but Im unsure regarding innodb-Engine.
Any advice?
|
|
|
|
|
| Re: binary backup [message #2379 is a reply to message #2357 ] |
Wed, 12 December 2007 21:19   |
|
| sterin wrote on Sat, 08 December 2007 13:23 |
A long time ago when I was setting up replication I remember reading in the manual that you could "flush .. read lock" and copy the InnoDB tablespace also and that InnoDB would perform recovery on the broken tablespace as soon as you started mysql on the slave.
|
If you can make a consistent snapshot of innodb's tablespace, then it would work. LVM backups work this way (flush, snapshot, tar, etc).
Alexey Kovyrin, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
|
|
|
|
| Re: binary backup [message #2381 is a reply to message #2380 ] |
Thu, 13 December 2007 03:53   |
|
| sterin wrote on Thu, 13 December 2007 03:41 |
| scoundrel wrote on Thu, 13 December 2007 03:19 |
If you can make a consistent snapshot of innodb's tablespace, then it would work. LVM backups work this way (flush, snapshot, tar, etc).
|
Unfortunately that was exactly what didn't work.
I made very sure that I held the lock during the copy so:
I aquired the lock in one frontend
Took a binary copy using tar or cp in another terminal window
Released the lock in the frontend
|
Lock does not guarantee CONSISTENT tablespace snapshot. LVM snapshot does (this is one of the most popular hot-backup solutions for mysql).
Alexey Kovyrin, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
|
|
|
| Re: binary backup [message #2404 is a reply to message #2381 ] |
Tue, 18 December 2007 11:38  |
erkules Messages: 58 Registered: December 2007 |
Member |
|
|
| scoundrel wrote on Thu, 13 December 2007 03:53 |
Lock does not guarantee CONSISTENT tablespace snapshot. LVM snapshot does (this is one of the most popular hot-backup solutions for mysql).
|
Talking to one from MySQL. He said dont use LVM it will work only almost of the time (concerning InnoDB). So all I can do is using a slave. But in fact Ive got to shut down mysqld:-(
|
|
|