Cópia rápida do DB com tabelas MyISAM e InnoDB par

Cópia rápida do DB com tabelas MyISAM e InnoDB par

am 27.05.2011 15:28:05 von Yoshio

Ol=E1 pessoal.

Tenho um banco com tabelas originalmente myisam e algumas outras eu
converti para innodb. Estou tentando converter outras tabelas maiores
por=E9m gostaria de fazer um teste primeiro, estava pensando em fazer
uma c=F3pia fiel da base, ctrl+c/v da base em outra m=E1quina para fazer o
teste.

=C9 poss=EDvel fazer uma copia f=EDsica do DB e jogar os arquivos em outra
m=E1quina? (ou outra forma r=E1pida de c=F3pia?)

Eu j=E1 tinha conseguido isso quando as tabelas eram todas myisam, mas
agora tem algumas como innodb e os arquivos n=E3o est=E3o em
"/var/lib/mysql/nomedabase" como de costume, as tabelas em innodb
est=E3o com apenas um arquivo *.frm.


Obrigado.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Cópia rápidado DB comtabelas MyISAM e InnoDB para outra servidor

am 27.05.2011 16:32:13 von a.smith

Hi,

if you want to copy from one server to another can't you just use
"mysqldump? This is then restored via the "mysql" command using a pipe
or STDIN redirection. If you can shutdown the database for the
duration of the copy then you can do cold backup of all data files.
Both options will be as fast as your database is small ;)

Andy.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Cópia rápida do DB com tabelas MyISAM e InnoDB

am 27.05.2011 16:46:12 von Yoshio

lol sorry for send the email in portuguese, I did not realize that the
list were in english (a little mistake, I have many mailing lists).

I can use mysqldump but its take many hours to complete a restore. I
can stop the server, so i'm think in a physical copy of the database.
But I have not found the innodb files. Where are that files?


2011/5/27 :
> Hi,
>
> =A0if you want to copy from one server to another can't you just use
> "mysqldump? This is then restored via the "mysql" command using a pipe or
> STDIN redirection. If you can shutdown the database for the duration of t=
he
> copy then you can do cold backup of all data files. Both options will be =
as
> fast as your database is small ;)
>
> Andy.
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dgeanyoshio@gm=
ail.com
>
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Cópia rápidado DB comtabelas MyISAM e InnoDB para outra servidor

am 27.05.2011 17:04:01 von a.smith

Quoting Yoshio :

> I can use mysqldump but its take many hours to complete a restore. I
> can stop the server, so i'm think in a physical copy of the database.
> But I have not found the innodb files. Where are that files?
>

InnoDB is a bit tricky, without going into details (I couldn't
reliably describe them anyway) doing an online backup by locking
tables isn't sufficient for InnoDB. The database must be cleanly
shutdown before you take your copy. Another thing I read is that you
must restore all InnoDB databases and tables from a cold backup, you
cannot copy only those you want. The data files should be under your
data dir, normally ibdata1 and some ib_logfile files, plus any related
subdirectories. You should be able to safely exclude any MyIsam only
databases as per usual,

cheers Andy.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Cópia rápida do DB com tabelas MyISAM e InnoDB

am 27.05.2011 17:08:33 von Yoshio

I found the ibdata and logfiles, but outside from my database dir.

so basically I need copy everything in /var/lib/mysql/* ?


2011/5/27 :
>
> Quoting Yoshio :
>
>> I can use mysqldump but its take many hours to complete a restore. I
>> can stop the server, so i'm think in a physical copy of the database.
>> But I have not found the innodb files. Where are that files?
>>
>
> InnoDB is a bit tricky, without going into details (I couldn't reliably
> describe them anyway) doing an online backup by locking tables isn't
> sufficient for InnoDB. The database must be cleanly shutdown before you take
> your copy. Another thing I read is that you must restore all InnoDB
> databases and tables from a cold backup, you cannot copy only those you
> want. The data files should be under your data dir, normally ibdata1 and
> some ib_logfile files, plus any related subdirectories. You should be able
> to safely exclude any MyIsam only databases as per usual,
>
> cheers Andy.
>
>
>
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Cópia rápidado DB comtabelas MyISAM e InnoDB para outra servidor

am 27.05.2011 17:29:42 von a.smith

Quoting Yoshio :

> I found the ibdata and logfiles, but outside from my database dir.
>
> so basically I need copy everything in /var/lib/mysql/* ?
>
>

Yeah that's normal, they will be in the top level of your MySQL
datadir. Yep, copy everything. As I said, if you have any MyISAM only
databases that you don't want to copy, you should be able to exclude
these directories, everything else you need to copy.

cheers Andy.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org