Problem:
I need make a reduced version of my database to transport to a
development environment. I would like to get the whole definition
of tables and some of the registers in a "reduced" file size.
Solution:
/*******************************************************************************/
Note: The information in this article applies to
InterBase v5.x
/********************************************************************************/
There are two ways to do this:
1. After deleting whatever you don't need, just do a backup
and a restore with GBAK. By default, gbak will flush out
obsolete records and compact the file. Indexes get rebalanced
as a result, too.
The syntax for doing the backup is:
gbak -b -t
The syntax for doing a restore is:
gbak -c
2. If you just want the definitions of the tables, indices, etc,
but do not want the actual data, then you can use the -m
switch in gbak to back up the metadata. This only stores
the definitions of the tables, etc. It does not store the
data in them. This is handy if you want to create an empty
copy of the database.
The syntax for doing a metadata only backup is:
gbak -b -m