#579: dbdump: dump only certain tables
----------------------+-----------------
Reporter: simko | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: MiscUtil | Version:
Keywords: |
----------------------+-----------------
Currently dbdump dumps all the tables. This is useful for site
cloning and backup purposes, but this takes time and disk space and
may not be always what we want.
It will be good to enrich dbdump CLI in order to offer more flexible
dumping options such as:
(a) `--dump-all` (or better said the default behaviour without any
option) will be to dump all tables, as is being done now. This is
useful for full backups.
(b) `--dump-config` which will dump only configuration tables such as
collections, portalboxes, submissions, etc, but no bib*, idx*, rnk*
and the like. (See also tabbibdrop.sql.) This is useful to port
overall configuration quickly from one site to another without
altering the site's data.
(c) `--dump-data` which will dump only bibliographic data and indexes
and the like. This will be useful e.g. to dump bib/idx/rnk tables
from PROD and putting them on DEV.
(d) `--dump-tables [regexp1] [regexp2] [...]` which is the most
flexible option that will dump only tables matching the given regexp
expressions. (See also mysqldump's own CLI options.) Useful for
porting certain tables in an ad-hoc manner.
(e) In addition, a new option `--no-data` may be added to the above
options which will make dbdump to dump only CREATE TABLE statements,
but no table data. (See mysqldump's own `--no-data' command.) This
is useful for comparing sites.
Note that the options b and c above are basically only handy shortcuts
for the option d so that people don't have to write expressions like
`--dump-tables ^(idx|bib|rnk)`. However, this may be fully acceptable
too in my eyes, if we document how to use the option d, so maybe the
options b/c are not really needed... Especially since we are staying
in the DB dumper domain here; the configuration dumper domain is
covered by ongoing inveniocfg dumper/loader tool. So I guess a/d/e
options will be enough.
--
Ticket URL: <http://invenio-software.org/ticket/579>
Invenio <http://invenio-software.org>