Choosing a backup method

After having determined whether a database can be stopped for the backup, a developer can choose from three methods of archiving:

  • Copying the data files (including administrative files such as logs and tablespaces)
  • Exporting delimited text files
  • Backing up with command-line programs

Which you choose depends on what permissions you have on the server and how you are accessing the data.

Note

MySQL also allows for two other forms of backup: using the binary log and by setting up replication (using the master and slave servers). To be sure, these are the best ways to back up a MySQL database. But, both of these are administrative tasks and require system-administrator authority; they are not typically available to a developer. However, ...

Get MySQL for Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.