Cannot repeatedly export tables from prepared backup

Bug #1648618 reported by Matthew B
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.3
Expired
Undecided
Unassigned
2.4
Expired
Undecided
Unassigned

Bug Description

1. Take a backup of a MySQL with several tables (AT, BT, CT)
2. Attempt to export out just BT (according to the manual:)
   xtrabackup --prepare --export --tables mydb.BT --target-dir ./

There's a problem right here. mydb.BT will match several tables for some reason. This could be a separate bug. Even mydb\.BT matches several tables.

3. Now that BT has been exported. Attempt to export CT using the same command as above. This will fail.

There is no documentation on how to repeatedly export multiple tables from the same prepared backup.

Use Case: Full backups each morning at 2AM. At 9AM, I made a mistake and need to restore BT via export. Good. After lunch, 12:30PM, someone else makes mistake (or I need a fresh copy of BT for testing). It is no longer possible to export from this backup as it has been prepared.

Suggested Fix: Make '--export' a first-class command. If the backup needs to be prepared, do so as part of '--export' (maybe warn the user Y/N to proceed?)

Repeated executions of --export should not result in failure.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

--tables clause has no effect on prepare and export, all the tables should have been exported as a result of step 2.

Basically --export instruct xtrabackup to merge the change buffer and create metadata files (*.cfg ones). There is no way to merge change buffer only for specific tables (and this is much more expensive operation than creating .cfg files), so I see no point in supporting --tables.

What kind of failure do you see when you are trying to export twice?

Revision history for this message
Matthew B (utdrmac) wrote :

I guess the documentation is not very clear on this. The documentation gives indication that if you have a 1TB backup and you need to restore just 1 or 2 tables, you can do --export --tables and list just those tables to restore.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

What page gives such indication? I am looking at https://www.percona.com/doc/percona-xtrabackup/2.4/xtrabackup_bin/restoring_individual_tables.html and see no mentions of "--tables" option at all.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona XtraBackup 2.4 because there has been no activity for 60 days.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona XtraBackup 2.3 because there has been no activity for 60 days.]

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-1418

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.