Re: best way to backup data
Posted by:
Rick James
Date: December 12, 2014 11:01PM
Lots of things _could_ go wrong.
If possible, pull a dump out of Evault onto a _different_ computer. Test not only the size of the tables, but also validate that all Stored Routines, View, Events Triggers, etc are intact. (I see arguments for those, but still check.)
mysqldump is quite reliable; most problems are due to misuse of it. I don't see any obvious misuse, but that does not prove anything.
Oh, and verify that all of your databases are reloaded -- I see "--databases"; that's a potential "misuse".
Oh, and what about users? Was `mysql` included in the dump? If so, you would need to reload into the same version. If not, well, there is another chance for "misuse".
Oh, did you stop all writes during the mysqldump? Are you sure? If not, the "referential integrity" of the data is probably compromised. Never mind; I see "--single-transaction". But that only works for InnoDB. Is that the only ENGINE you are using?
Etc.
Etc.
There is no "best way". If what you have checks out, and it does not take too long, then your way is probably good enough for you. Some systems are huge, and cannot afford the hours of no writing that "--single-transaction" imposes. So, for them, it is far from "best".
Other "best" ways involve replication or LVM or Galera or XtraBackup or ... This forum is littered with discussions of each.