Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Sep 08, 2010 3:06 am 
Offline
Newbie

Joined: Thu Dec 03, 2009 5:30 am
Posts: 3
hi
I purchased the linode backup service to ease my brain.
But then I was told by a friend to dump mysql db to file before the linode backup window period. This make me worry.

So here is my questions:
1) Why do i need to backup my db? is it because linode backup could screw up my db?
2) Does the linode backup backup all my db data too?


Top
   
 Post subject:
PostPosted: Wed Sep 08, 2010 3:26 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
1) No and yes. No it won't screw up your live database, but the backup may contain a database with partially executed queries. I.e. if a query is running at the same time as your database is being backed up then problems can arise, so yes you should dump your database manually first.
2) Yes, but as per 1. it maybe inconsistent.

So if you know your database takes 10 minutes to dump, and you have a backup that runs at 5am, dump your database at say 4:40am which gives you 10 minutes safety margin. That way if your database is corrupted in a backup you'll have lost at most 20 minutes data.


Top
   
 Post subject:
PostPosted: Wed Sep 08, 2010 7:14 am 
Offline
Newbie

Joined: Thu Dec 03, 2009 5:30 am
Posts: 3
ok
other than inconsistency.
could the backup actually corrupt my database if I were doing query while the linode backup doing his work?


Top
   
 Post subject:
PostPosted: Wed Sep 08, 2010 8:40 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
It could corrupt the database stored in the backup, but it won't corrupt the live database.

Most databases have some form of recovery mechanism if you use mysql with the default myisam, those don't recover too well since they're not crash safe.


Top
   
 Post subject:
PostPosted: Wed Sep 08, 2010 10:11 am 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
Whenever you wander down the road of recovering a MySQL database, the news generally isn't good. You might get away with backing up a live DB, but I'd strongly recommend against it - there's too many opportunities for problems.

Just schedule a dump before your backup, and if you have to restore, restore the backup then restore your DB from the dump. It's good practice for any MySQL backup scenario.

Chris highlighted some of the things that can go wrong, and I'm simply echoing his thoughts on this.

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject:
PostPosted: Sun Sep 12, 2010 2:20 pm 
Offline
Junior Member

Joined: Tue Aug 31, 2010 12:14 am
Posts: 27
this was actually an issue i had with cPanel backups.
most of the tables in a database were fine but some were corrupted.
if the table is in use then it will not backup, unless you do a mysqldump


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group