Re: copying a database in real time.

From: Axel Schwenke <axel.schwenke_at_gmx.de>
Date: Tue, 16 Jan 2018 22:58:00 +0100
Message-ID: <p3lsh9$ols$1_at_dont-email.me>


[Quoted] On 16.01.2018 19:34, The Natural Philosopher wrote:

> Actually what I did was create a 'tar' of the existing database, sftp it
> across, stop te mmysql servee and untar it into the mysql databse area.
>
> I did lose one record as it overlapped a data update period

[Quoted] You could have done that much more cleverly. I.e. copy the data directory with sftp while the server was running. Then wait for a 5 minute window without updates, stop the old server, use rsync to synchronize last minute changes and finally start the new server. 5 minutes of downtime are a very relaxed schedule for that.

[Quoted] Another solution with 0 downtime was given to you be Lew in the first answer already. Setup the new server as replication slave of the old one. Then you can redirect first your readers, then your writers to the new server without any interruption of service. Received on Tue Jan 16 2018 - 22:58:00 CET

Original text of this message