Chapter 6. Exporting Structure and Data (Backup)

Keeping good backups is crucial to a project. Backups consist of up-to-date backups and intermediary snapshots taken during development and production phases. The export feature of phpMyAdmin can generate backups, and can also be used to send data to other applications.

Note

Please note that phpMyAdmin's export feature produces backups on demand and it is highly recommended to implement an automatic and scripted backup solution which takes backups on a regular schedule. The precise way to implement such a solution depends on the server's OS.

Dumps, backups, and exports

Let us first clarify some vocabulary. In MySQL documentation, you will encounter the term dump, and in other applications, backup or export. All these terms have the same meaning in the phpMyAdmin context.

MySQL includes mysqldump —a command-line utility that can be used to generate export files. But the shell access needed for command-line utilities is not offered by every host provider. Also, access to the export feature from within the web interface is more convenient. This is why phpMyAdmin offers the export feature with more export formats than mysqldump. This chapter will focus on phpMyAdmin's export features.

Before starting an export, we must have a clear picture of the intended goal of the export. The following questions may be of help:

  • Do we need the complete database or just some tables?
  • Do we need just the structure, just the data, or both?
  • Which utility will be used to import back the data?
  • Do we want only a subset of the data?
  • What is the size of the intended export, and what is the link speed between us and the server?

Scope of the export

When we click an Export link from phpMyAdmin, we can be in one of these views or contexts—Database view, Table view, or Server view (more on this later in Chapter 19). According to the current context, the resulting export's scope will be a complete database, a single table, or even a multi-database as in the case of Server view. We will first explain database exports and all the relevant export types. Then we will go on with table and multi-database exports, underlining the difference for these modes of exporting.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.69.157