--exclude=<database list> command line option
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Triaged
|
Wishlist
|
Unassigned | ||
2.0 |
Won't Fix
|
Undecided
|
Unassigned | ||
2.1 |
Triaged
|
Wishlist
|
Unassigned | ||
2.2 |
Triaged
|
Wishlist
|
Unassigned | ||
2.3 |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Hi Percona,
I've modified the innobackupex-1.5.1 tool to add the following features:
* --exclude=<database list> command line option : Exclude certain databases from copying of .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ and .opt files
* Added code to tolerate race condition in copying of .frm etc files
* Added additional output to display more information on backups which don't complete 100% properly
* minor code restructuring for readability
Given that this is open source, I thought I'd submit my modifications back to you, in case you feel like including them in a subsequent release.
Regarding the race condition, here's the scenario I'm trying to avoid
1. MySQL server running during backup
2. innobackupex in --no-lock mode, because I don't want to quiesce the database during the copy of .frm etc files
3. In subroutine backup_files, a READDIR generates a list of all files to be copied to the backup area
4. Copy starts, but can take a long time
5. At some point after the READDIR but before to copy the active MySQL server receives a DROP TABLE command
6. The associated files are removed, by the time innobackupex gets to try to do the copy
7. innobackupex throws a fatal error, shutting down the backup
Depending on the use model of the database, this may or may not be a major issue. For us it is not, because the tables which come and go like this do not hold critical information - it's scratchpad information, essentially.
In this modification, I trap the return code for the 'cp' command (I also cover the scp and tar features, but in a different way) and make a note of which files could not be copied.
At the end of the backup process, the code displays which databases / files were either skipped (with --exclude) or were only partially copied. The exit code of innobackupex is modified so that only a 100% complete backup will return a zero exit code.
I will _try_ to attach a patch to this bug. If I can't do that, please contact me directly and I'll forward it along.
Regards,
Nick Pavey
Related branches
Changed in percona-xtrabackup: | |
status: | Confirmed → Triaged |
importance: | Undecided → Low |
milestone: | none → 1.6 |
Changed in percona-xtrabackup: | |
milestone: | 1.6 → none |
Changed in percona-xtrabackup: | |
assignee: | Valentine Gostev (longbow) → nobody |
tags: | added: contribution |
summary: |
- Possible patch for innobackupex-1.5.1 to add features? + --exclude=<database list> command line option |
Assigned to core-longbow to prepare test-case