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
Add ability to backup/restore only those (several) tables which are enumerated as command line argument (pattern) [CORE5538] #5806
Comments
Commented by: Sean Leyne (seanleyne) It seems that you are trying to describe something more along the lines of "Backup_Only", correct? |
Commented by: @pavel-zotov > It seems that you are trying to describe something more along the lines of "Backup_Only", correct? May be :-) PS. |
Commented by: Sean Leyne (seanleyne) Your point about backup vs. restore is very valid, hadn't considered that. While I think further about the correct label/name... What would be the consequence of using both SKIP_DATA and SKIP_EXCEPT at the same time, and where a table name meets both criteria? Would the table be processed? |
Commented by: Sean Leyne (seanleyne) I think I have syntax/options which would allow for complete control: - "Data_Exclude" -- Replacement for current "SKIP_DATA" {Actually the Exclude/Include options could be used as required to best define the tables to be processed} The precedence/processing order of the options would be as follows:
|
Commented by: @asfernandes As skip_data is a regexp, can't it already be used for both (skip, no-skip) purposes? |
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: @AlexPeshkoff May be it can be used for both purposes - but special switch is simpler and cleaner for most users |
Commented by: Sean Leyne (seanleyne) Alexander is correct, the regexp required to handle exclude is anything but straight-forward (I thought so, but my research found it is not). Separate switch would be the easiest to use. |
Commented by: @pavel-zotov > As skip_data is a regexp, can't it already be used for both (skip, no-skip) purposes? Unfortunately, this key can be used only for SKIP, but not for preserve. This is because we can not use in command line (i.e. gfix switch) somewhat like "NOT similar to <pattern>". Consider following: recreate table tnames(s varchar(31)); How can we select all rows EXCEPT three: 'doca', 'docb' and 'docc' - and at the same time avoid using of logical negation ("NOT') ? This: select s But this: select s It's NOT the same as one may to expect: grouping of three characters: "(" and ")" -- seems to not work here. |
Commented by: @pavel-zotov BTW: is it possible to back-port this feature to 2.5.x ? |
Commented by: Sean Leyne (seanleyne) Pavel, Your comment is in the wrong context. The feature is about handling/processing of Tables, not rows! The excluding of rows is a completely different subject. (it also would not get my vote!) |
Commented by: @pavel-zotov Sean, consider table names as rows from rdb$relations, please. It is rdb$relations which is used by gbak when we apply '-skip' command switch (AFAIU). |
Commented by: Sean Leyne (seanleyne) Pavel, How was I to expect that I needed to "consider table names as rows from rdb$relations"? |
Commented by: @pavel-zotov me wrong :-) |
Modified by: @aafemtassignee: Alexander Peshkov [ alexpeshkoff ] => Dimitry Sibiryakov [ aafemt ] |
Commented by: @aafemt Mostly it should be a copy-paste of code handling -SKIP_DATA switch. |
Modified by: @aafemtstatus: Open [ 1 ] => Open [ 1 ] Target: 3.0.6 [ 10889 ] Implementation: [Trivial] |
Modified by: @aafemtstatus: Open [ 1 ] => In Progress [ 3 ] |
Modified by: @aafemtTarget: 3.0.6 [ 10889 ] => 4.0 Beta 2 [ 10888 ] status: In Progress [ 3 ] => In Progress [ 3 ] |
Modified by: @aafemtstatus: In Progress [ 3 ] => Open [ 1 ] |
Commented by: @aafemt Pull request to master branch created. |
Modified by: @aafemtstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Beta 2 [ 10888 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done successfully |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @pavel-zotov
Assigned to: @aafemt
Votes: 1
gbak -? 2>&1 | findstr /i /c:"skip"
the <pattern>
This command switch is useful when we want to skip SEVERAL but leave DOZEN of tables, but it does NOT allow to solve opposite task: when we need to b/r only several tables of their huge total number.
Please consider to implement command-line switch like this:
-- where <pattern> must follow SIMILAR_TO logic and rules.
Commits: 46102b6 8a8d778
The text was updated successfully, but these errors were encountered: