Linode Backup & MySQL db?

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?

5 Replies

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.

ok

other than inconsistency.

could the backup actually corrupt my database if I were doing query while the linode backup doing his work?

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.

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.

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

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct