Moving database from one machine to another machine..

Moving database from one machine to another machine..

am 14.09.2011 22:06:56 von prabhat kumar

--001517740ae05b0eaf04acec4d4a
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have 2 machine. Master and a slave replication.

few days back I have switched slave machine (innodb_file_per_table) from single
innodb file to one per file table.

Now I want to do for Master.

Now question,

Is it recommendable this method, stop MYSQL services on both and copy mysql
file's at system level (using scp or rync) form slave machine to master
(after deleting ibdata1 and ib_log). update the variable innodb_file_per_table
to switch master to one per file table. and start master..

or I can go with usual process.. export and import.

And suggestion?


Best Regards,

Prabhat Kumar
MySQL DBA

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat

--001517740ae05b0eaf04acec4d4a--

Re: Moving database from one machine to another machine..

am 14.09.2011 22:11:47 von Reindl Harald

--------------enig4E066F9937FBB0BE2CE3C6F9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable



Am 14.09.2011 22:06, schrieb Prabhat Kumar:
> Hi,
>=20
> I have 2 machine. Master and a slave replication.
>=20
> few days back I have switched slave machine (innodb_file_per_table) fro=
m single
> innodb file to one per file table.
>=20
> Now I want to do for Master.
>=20
> Now question,
>=20
> Is it recommendable this method, stop MYSQL services on both and copy m=
ysql
> file's at system level (using scp or rync) form slave machine to master=

> (after deleting ibdata1 and ib_log). update the variable innodb_file_p=
er_table
> to switch master to one per file table. and start master..
>=20
> or I can go with usual process.. export and import

if you have a consistent mysql-server which can be stopped and the whole =
datadir
copied whereever you want this was and will always be the best solution

said this independent of the software becasue the only interesting fact i=
s
if the can data migrated 100% consistent, every sort of export/import
is per design complexer, slower and maybe unsafer



--------------enig4E066F9937FBB0BE2CE3C6F9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5xCoMACgkQhmBjz394AnmmWgCfYTYoHro20FI2VunmpQsT lzLa
ZgkAn0qhLXLwu9ePpQrIEhoC/5GANENh
=PinO
-----END PGP SIGNATURE-----

--------------enig4E066F9937FBB0BE2CE3C6F9--

Re: Moving database from one machine to another machine..

am 15.09.2011 07:03:55 von sureshkumarilu

--20cf305e2513b621e004acf3cd00
Content-Type: text/plain; charset=ISO-8859-1

If the hardware on master and slave, version of mysql server, configuration
and memory allocations are same then you can do a clean shutdown of mysql on
slave and copy the files to master. Check if any memories needs to be
adjusted and start mysql adding the innodb_file_per_table option on master
server. So the table created in future also take the advantage of per table
option.

On Thu, Sep 15, 2011 at 1:41 AM, Reindl Harald wrote:

>
>
> Am 14.09.2011 22:06, schrieb Prabhat Kumar:
> > Hi,
> >
> > I have 2 machine. Master and a slave replication.
> >
> > few days back I have switched slave machine (innodb_file_per_table) from
> single
> > innodb file to one per file table.
> >
> > Now I want to do for Master.
> >
> > Now question,
> >
> > Is it recommendable this method, stop MYSQL services on both and copy
> mysql
> > file's at system level (using scp or rync) form slave machine to master
> > (after deleting ibdata1 and ib_log). update the variable
> innodb_file_per_table
> > to switch master to one per file table. and start master..
> >
> > or I can go with usual process.. export and import
>
> if you have a consistent mysql-server which can be stopped and the whole
> datadir
> copied whereever you want this was and will always be the best solution
>
> said this independent of the software becasue the only interesting fact is
> if the can data migrated 100% consistent, every sort of export/import
> is per design complexer, slower and maybe unsafer
>
>
>


--
Thanks
Suresh Kuna
MySQL DBA

--20cf305e2513b621e004acf3cd00--

Re: Moving database from one machine to another machine..

am 15.09.2011 07:04:58 von sureshkumarilu

--20cf303f67fa7f96eb04acf3d1b8
Content-Type: text/plain; charset=ISO-8859-1

Hi Prabhat,

FYI

On Thu, Sep 15, 2011 at 10:33 AM, Suresh Kuna wrote:

> If the hardware on master and slave, version of mysql server, configuration
> and memory allocations are same then you can do a clean shutdown of mysql on
> slave and copy the files to master. Check if any memories needs to be
> adjusted and start mysql adding the innodb_file_per_table option on master
> server. So the table created in future also take the advantage of per table
> option.
>
>
> On Thu, Sep 15, 2011 at 1:41 AM, Reindl Harald wrote:
>
>>
>>
>> Am 14.09.2011 22:06, schrieb Prabhat Kumar:
>> > Hi,
>> >
>> > I have 2 machine. Master and a slave replication.
>> >
>> > few days back I have switched slave machine (innodb_file_per_table) from
>> single
>> > innodb file to one per file table.
>> >
>> > Now I want to do for Master.
>> >
>> > Now question,
>> >
>> > Is it recommendable this method, stop MYSQL services on both and copy
>> mysql
>> > file's at system level (using scp or rync) form slave machine to master
>> > (after deleting ibdata1 and ib_log). update the variable
>> innodb_file_per_table
>> > to switch master to one per file table. and start master..
>> >
>> > or I can go with usual process.. export and import
>>
>> if you have a consistent mysql-server which can be stopped and the whole
>> datadir
>> copied whereever you want this was and will always be the best solution
>>
>> said this independent of the software becasue the only interesting fact is
>> if the can data migrated 100% consistent, every sort of export/import
>> is per design complexer, slower and maybe unsafer
>>
>>
>>
>
>
> --
> Thanks
> Suresh Kuna
> MySQL DBA
>



--
Thanks
Suresh Kuna
MySQL DBA

--20cf303f67fa7f96eb04acf3d1b8--