database

Backup prefixed tables in MySQL without PHP

Just a quick note which took me some time and advice asking to find out. I have a database with two drupal installations separated by a table prefix, say drupal1_ and drupal2_. Lets call my database simply myDB.

If I'd like to backup only certain tables to an SQL file using mysqldump, I'd have to list all the table names separately. This is not nice at least since module installations and upgrades might add prefixed tables to the database dynamically over time. The other catch is that I want to do this without PHP.

Syndicate content