LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-12-2016, 10:27 AM   #1
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Best way to take initial backup when starting MySQL replication?


I have a moderately-busy MySQL database that's about 78 gigabytes in size, and we are going to start replicating it. What is your opinion of the best way to do the initial backup / contents-capture to populate the slave? Any other good websites to bone-up on before doing this?

My impression is: "MySQLDump and plan for about an hour's downtime ... yes?"

Last edited by sundialsvcs; 02-12-2016 at 10:37 AM.
 
Old 02-12-2016, 12:51 PM   #3
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
You can reduce downtime with rsync. First rsync /var/lib/mysql, stop mysql, and rsync again. But the mysqldump way is easier and safer.
 
Old 02-15-2016, 03:03 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
mysqldump with the --master-data and just take the initial performance hits are what I usually go with.

If your replication is for backup rather than as a live "slave" server then you might want to consider not replicating any tables that use the MEMORY engine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup or replication files utility question otnateos Linux - General 6 07-10-2014 09:55 PM
Mysql replication failed after mysql reboot ajayan Linux - Newbie 8 09-08-2010 11:00 AM
Timeout error on starting MySQL after adding Master for replication ALInux Linux - Server 0 10-27-2008 09:09 AM
Setting up my second box as a backup DNS and Database Replication netdynamix Linux - Networking 5 03-27-2007 07:19 PM
Initial PHP configuration after starting MySQL and Apache studioq Linux - Newbie 2 09-27-2006 11:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration