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 11-28-2017, 09:51 PM   #1
bmxakias
Member
 
Registered: Jan 2016
Posts: 254

Rep: Reputation: Disabled
Question Backup solution for huge 150GB database


Hello

I am using to backup a (MariaDB) database of size 150GB:

Code:
mysqldump --opt --single-transaction
but server start to not respond at the time of backup for a few minutes so i am looking for any other solution to replace mysqldump.

Any other solutions for huge databases?

Thank you
 
Old 11-28-2017, 10:11 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Some ideas here. https://www.urbackup.org/backup_mysql.html

Here too. https://twindb.com/mydumper-rpm-for-centosrhel/


I assume you are correct in that the size is the problem.
 
Old 11-29-2017, 04:41 AM   #3
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
Do your database dumps on one of your replication slaves (you are replicating such a large database for resilience?) where the lock lag won't matter to the slave.
 
Old 11-29-2017, 09:50 AM   #4
bmxakias
Member
 
Registered: Jan 2016
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
Do your database dumps on one of your replication slaves
I do not replicate it yet....
 
Old 11-29-2017, 09:58 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by bmxakias View Post
I do not replicate it yet....
Then perhaps it's a great time to start, since you want backups with no lag/performance degradation. Or you can pay a sack of money to someone and purchase an enterprise-class backup system (Netbackup, Tivoli Storage Manager, etc.), that will let you do hot backups.
 
Old 11-29-2017, 11:20 AM   #6
bmxakias
Member
 
Registered: Jan 2016
Posts: 254

Original Poster
Rep: Reputation: Disabled
I thought replication will add a delay as the data must go from the master to slave ....
 
Old 11-29-2017, 12:32 PM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by bmxakias View Post
I thought replication will add a delay as the data must go from the master to slave ....
It's best to not speculate but find out what's really going on. Replication is real-time, and it outlines all of this in the documentation. And even if there IS a little bit of a delay, you still have two options:
  • Live with a delay from whatever source (mysqldump, replication, whatever)
  • Pay a sack of money to buy a hot-backup tool
Pick one.
 
Old 11-30-2017, 05:21 AM   #8
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
Quote:
Originally Posted by bmxakias View Post
I thought replication will add a delay as the data must go from the master to slave ....
A delay to what?

MYSQL replication is fairly robust and your backup will still be a point of time backup of the slave at that time, any changes during the time the backup was "locked" will queue on the master and when the backup has completed these changes will replicate to the slave.

There is no degradation of performance on the master.

My personal preference is to pause the replication on the slave and do the backups (I have multiple databases) and then unpause the replication.
 
Old 11-30-2017, 04:34 PM   #9
bmxakias
Member
 
Registered: Jan 2016
Posts: 254

Original Poster
Rep: Reputation: Disabled
Quote:
My personal preference is to pause the replication on the slave and do the backups
How do you pause it and start it again?
 
Old 11-30-2017, 04:42 PM   #10
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
Quote:
Originally Posted by bmxakias View Post
How do you pause it and start it again?
Code:
mysqladmin stop-slave
My backup script is fairly documented.

https://centos.tips/mysql-backup-1-1/
 
Old 11-30-2017, 10:42 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
One other option that may be available: do you have multiple schemas in the db or just the one? If multiple, are they entirely independent.
My point being, backing them up separately can give you smaller/faster backups.
 
Old 12-01-2017, 07:57 AM   #12
bmxakias
Member
 
Registered: Jan 2016
Posts: 254

Original Poster
Rep: Reputation: Disabled
Ok great thank you all
 
  


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
Need to create or build a Linux database software to use my existing window base database backup Hidemitsu Linux - Newbie 6 03-30-2016 10:37 AM
Code & database backup solution catcher.dev Linux - Software 1 07-07-2011 12:32 AM
Backup huge database Ammad Linux - General 5 11-28-2009 08:36 PM
MySQL help with huge database izghitu Linux - Software 1 11-26-2007 07:46 PM
LXer: A database solution is more than database software LXer Syndicated Linux News 0 09-25-2006 08:54 AM

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

All times are GMT -5. The time now is 06:13 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