Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th March 2014, 15:30
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default Poor man's solution for "continous" mysql backups?

With continuos I mean short-intervals, i.e. every 15 minutes for example.

I'm not interested in where to store the backups, just what the most elegant solution is... I'd like to avoid running mysqldump via cron every 15 minutes....

So here is what I thought about, just need some feedback if that is doable and makes sense...

Use a copy-script to copy /var/lib/mysql into a specific backup folder. What happens there (i.e. dedup, compression, upload to S3) isn't important, I just need to know if this is feasible or if file-based mysql backup like this isn't safe?

Anyone else doing short-interval mysql backups care to share your methods?
Reply With Quote
Sponsored Links
  #2  
Old 20th March 2014, 16:28
florian030 florian030 is offline
Senior Member
 
Join Date: Oct 2012
Posts: 222
Thanks: 8
Thanked 62 Times in 53 Posts
Default

You can copy the mysql-databases if you don´t need a safe backup. When copying databases mysql may change the tables. You can prevent this by shutting down mysql .

Is there any reasons why you don´t want to use mysqldump? You can also try mysqlhotcopy.
__________________
regards
Florian

blog.schaal-24.de
Reply With Quote
  #3  
Old 20th March 2014, 16:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,763
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

If you want to do frequent mysql backus without affecting the performance of your mysql server, then setup a second mysql server and configure it as slave server of your master server and run the mysql backups on that slave server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 21st March 2014, 07:12
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default

@florian030: just spinning some ideas. didn't want to use mysqldump because apparently mysqldump has to get a read lock on the tables and hold it for the duration of the backup in order to ensure a consistent backup and mysqlhotcopy cannot handle InnoDB as far as I have found out.

Was looking at file based backups as not to interrupt access to the DB and because I could use something like rsync that only copies changes...

@till: that sounds like the best idea so far, could setup a tiny virtual machine on the same server actually for this...
Reply With Quote
  #5  
Old 21st March 2014, 07:45
florian030 florian030 is offline
Senior Member
 
Join Date: Oct 2012
Posts: 222
Thanks: 8
Thanked 62 Times in 53 Posts
Default

You can use --skip-lock-tables. BTW i´m running a sql-save for creating the backups as Till suggested.
__________________
regards
Florian

blog.schaal-24.de
Reply With Quote
  #6  
Old 21st March 2014, 13:28
Acceos Acceos is offline
Junior Member
 
Join Date: Mar 2014
Posts: 18
Thanks: 0
Thanked 1 Time in 1 Post
Default

I agree with Till.

If you have several servers up and running, you could even go with a snapshot from the server you want to backup. Send the snapshot to a second server. Check the tables for corruption. If all fine - Run the backup.
Reply With Quote
  #7  
Old 24th March 2014, 11:31
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
 
Default

hm, yeah, all good advice.
Basically, I was just looking if I can duplicate a feature I saw at another webhost offering:
Quote:
VaultPress makes it easy to keep an up-to-date backup of your site with both daily and realtime syncing of all your WordPress content.
I know that is quite a service they are offering so I was looking into something like that :-)

They say:
Quote:
VaultPress will backup every post, comment, media file, revision and dash*board setting as they happen.
So I guess the closest I can do to that is, have a plugin that hooks into different Wordpress actions and runs a mysqldump or export on certain tables that have changed...

Thanks for all the feedback though :-)
Reply With Quote
Reply

Bookmarks

Tags
backup, mysql

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot login to very slow login page after Mysql dump import tbcham Installation/Configuration 3 21st June 2013 19:24
ISPConfig 3 - MultiServer Setup - With Dedicated Control Panel - How? SuperJC Installation/Configuration 4 16th October 2012 20:03
Squirrelmail login failure Cracklefish Installation/Configuration 9 30th June 2010 20:38
Problems installing LAMP - MySQL and PHP5 JosBR Server Operation 5 19th December 2009 21:00
Problem installing MySQL on suse 10.3 Txchaser Installation/Configuration 20 18th April 2008 01:05


All times are GMT +2. The time now is 03:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.