[FB-Tracker] Created: (CORE-5538) Add ability to backup/restore only those (several) tables which are enumerated as command line argument (pattern)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[FB-Tracker] Created: (CORE-5538) Add ability to backup/restore only those (several) tables which are enumerated as command line argument (pattern)

JIRA tracker@firebirdsql.org
Add ability to backup/restore only those (several) tables which are enumerated as command line argument (pattern)
-----------------------------------------------------------------------------------------------------------------

                 Key: CORE-5538
                 URL: http://tracker.firebirdsql.org/browse/CORE-5538
             Project: Firebird Core
          Issue Type: Improvement
          Components: Engine, GBAK
            Reporter: Pavel Zotov
            Priority: Trivial


 gbak -? 2>&1 | findstr /i /c:"skip"

    -SKIP_D(ATA) <pattern> skip data for all tables which are specified in
 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:

    -SKIP_E(CEPT) <pattern> skip data for all tables EXCEPT those which are specified in the <pattern>

-- where <pattern> must follow SIMILAR_TO logic and rules.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|

Re: [FB-Tracker] Created: (CORE-5538) Add ability to backup/restore only those (several) tables which are enumerated as command line argument (pattern)

Ann Harrison-3
This is far from a simple request and would require fundamental changes to gbak.  Gbak is a logical dump of database contents that when restored creates a new database.  What would a restore of a partial backup create?  A partial database?  An overwritten old database?

What benefit would this feature bring?

Regards,

Ann

> On May 15, 2017, at 9:44 AM, Pavel Zotov (JIRA) <[hidden email]> wrote:
>
> Add ability to backup/restore only those (several) tables which are enumerated as command line argument (pattern)
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CORE-5538
>                 URL: http://tracker.firebirdsql.org/browse/CORE-5538
>             Project: Firebird Core
>          Issue Type: Improvement
>          Components: Engine, GBAK
>            Reporter: Pavel Zotov
>            Priority: Trivial
>
>
> gbak -? 2>&1 | findstr /i /c:"skip"
>
>    -SKIP_D(ATA) <pattern> skip data for all tables which are specified in
> 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:
>
>    -SKIP_E(CEPT) <pattern> skip data for all tables EXCEPT those which are specified in the <pattern>
>
> -- where <pattern> must follow SIMILAR_TO logic and rules.
>
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|

Re: [FB-Tracker] Created: (CORE-5538) Add ability to backup/restore only those (several) tables which are enumerated as command line argument (pattern)

Leyne, Sean


> This is far from a simple request and would require fundamental changes to
> gbak.

FYI, v2.5 already has the basic feature.

Pavel's request is to make it easier to define the scope/criteria of the tables to be excluded.


 Gbak is a logical dump of database contents that when restored
> creates a new database.  What would a restore of a partial backup create?  A
> partial database?  An overwritten old database?

The use case for this feature is very specific, but very handy.

It also requires a knowledge of the schema to ensure that FK constraints are not violated.


> What benefit would this feature bring?

We use it.

It allows us to make very fast backups -- or exclude from which exclude tables that are not important to assisting in the debugging of client problems with our application (ie. audit activity/detail tables which are 100GB+)


Sean


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|

Re: [FB-Tracker] Created: (CORE-5538) Add ability to backup/restore only those (several) tables which are enumerated as command line argument (pattern)

Alex Peshkoff
In reply to this post by Ann Harrison-3
On 05/16/17 14:10, Ann Harrison wrote:
> This is far from a simple request and would require fundamental changes to gbak.

Taking into an account that we already have an ability NOT include data
from some tables into backup/restore process I do not agree with you
here :) Well - not 5 lines change but certainly very far from
"fundamental changes".

> Gbak is a logical dump of database contents that when restored creates a new database.  What would a restore of a partial backup create?  A partial database?

Yes.

> An overwritten old database?
>
> What benefit would this feature bring?
>

This can be better answered by an author of a ticket :)
I can imagine for example a need to try a number of statistics queries
on some predefined set of tables (including SQL debugging needs). One
may try one, another, etc forms of SQL to get desired results. Later
appropriate indices may be added to optimize query which provides needed
result. In order not to overload production server it's good idea to
work with database copy on another box. But making a copy of all TBytes
of initial DB is not needed - we need a limited set of tables. In that
case mentioned improvement can help making such DB backup faster (yes,
it will have broken FKs, but for mentioned purporse it doesn't matter).



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel