Knowledgebase

Exporting Only Part of a Database Print

  • databasesphpmyadmin, databases, database, backup, restore, migration, phpmyadmin, guide
  • 0

Taking specific tables or rows.

WHY

Recovering one table from a backup Moving specific data between sites Excluding bloat from a migration Extracting data for analysis

EXPORTING SPECIFIC TABLES

In phpMyAdmin, select the database, then the Export tab, then Custom. Choose which tables to include.

EXPORTING STRUCTURE WITHOUT DATA

Useful for log and statistics tables you do not want to migrate. The table is created empty and the application repopulates it.

EXPORTING QUERY RESULTS

Run a SELECT, then use the export option beneath the results.

Useful for extracting a subset of rows rather than whole tables.

IMPORTING ONE TABLE

Drop the existing version of that table first, then import.

Be careful: tables have relationships. Restoring one in isolation can leave data inconsistent.

WHEN THIS IS THE RIGHT APPROACH

Recovering something specific without rolling back everything.

Restoring a whole database to retrieve one setting loses everything since the backup.

THE SAFER ROUTE

Import the backup into a separate database, find what you need, and copy it across.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot