I’ve discovered with this SQL command:
SELECT * FROM wp_blogs;
That the field “blog_id” can be used to distinct all the tables related to a sub-site.
For example:
SELECT blog_id, path FROM wp_blogs;
+---------+----------------------+
| blog_id | path |
+---------+----------------------+
| 1 | / |
| 3 | /myfriend/ |
+---------+----------------------+
Then I can list site’s tables:
SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = "multisitedatabase" AND TABLE_NAME LIKE "wp_3_%";
+-------------------------+
| TABLE_NAME |
+-------------------------+
| wp_3_commentmeta |
| wp_3_comments |
| wp_3_ec3_schedule |
| wp_3_links |
| wp_3_options |
| wp_3_postmeta |
| wp_3_posts |
| wp_3_socialslider |
| wp_3_term_relationships |
| wp_3_term_taxonomy |
| wp_3_terms |
+-------------------------+
I suppose these are all the tables to be exported for a complete backup (database part).