New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New gbak option to ignore specific tables data during the backup [CORE2208] #2636
Comments
Commented by: @AlexPeshkoff Errors happening when gbak restores foreign key with missing data are not fatal since 2.0 - given foreign key becomes inactive in such case. Restored database remains in shutdown state, i.e. nobody except DBA can access it. |
Commented by: Sean Leyne (seanleyne) If this feature can get approved, BroadView already has code in its private tree, which enables a "-Skip_Data" options for both backups and restores via GBak. We would be happy to contribute the code to the project. |
Commented by: @samofatov The feature is in fact in B2_0_BV_Stable6 branch of Firebird public tree |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Commented by: @dyemanov I see no reason why it cannot be approved :-) |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] => Alexander Peshkov [ alexpeshkoff ] |
Commented by: @WarmBooter Any progress on this request? I also would like to see this feature backported to 2.1.x and 2.5.x if possible. |
Modified by: @AlexPeshkoffTarget: 3.0.0 [ 10048 ] => 3.0 Beta 1 [ 10332 ] status: Open [ 1 ] => Open [ 1 ] |
Commented by: @AlexPeshkoff Taking into an account that it definitely does not require any ODS change, I plan to get it ready before beta1. |
Commented by: @AlexPeshkoff B2_0_BV_Stable6 was taken as a base for that feature. Switch -SKIP_D(ATA) accepts regular expression, i.e. to skip (for example) 2 tables one can: What about backporting - sorry, backporting even simple switch it's too easy to break accidetially something around, which is not good for stable releases. |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 1 [ 10332 ] |
Commented by: @WarmBooter No problem, Alex. At last, feature will be present in FB 3. |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done with caveats Test Details: It was found that there is NO ability (in fbtest only! not in command interpreter) |
Commented by: Franz J Fortuny (frafor49) I have installed 3.0, latest version (Ubuntu) and gbak has no switch skip_xx or similar. gbak:Usage: No skyp_xx switch here. What happened? |
Commented by: @dyemanov -SKIP_D(ATA) skip data for table |
Submitted by: @WarmBooter
Is duplicated by CORE4343
Is related to QA637
Votes: 12
I would like to ask for a new gbak switch to avoid data from the specified tables to be included in the backup. It would be useful, for example, to generate backup without data from log tables, etc. In situations like downloading customer DB for debug, those tables may not be necessary, so ignoring its data usually makes the backup file much smaller.
Of course, in standard situations, user needs to take care to not "ignore" data from tables with referential integrity that could make the restore to fail. If you guys think this can be a problem, gbak could be enhanced to check if there would be broken dependencies and return an errorcode.
Commits: 523c55f FirebirdSQL/fbt-repository@033458e
====== Test Details ======
It was found that there is NO ability (in fbtest only! not in command interpreter)
to skip data from backup for table with non-ascii name, neither if we specify its name
as literal nor via pattern. For that reason one of checks currently is commented
(see inside .fbt, code block titled as: `Run-3: try to skip BACKUP of data for table "опечатка"`).
The text was updated successfully, but these errors were encountered: