copy_db -- a garbage collecting gap4 database copier and merger
copy_db
[-v
] from.vers ... to.vers
Copy_db
copies one or more gap4 databases to a new name by
physically extracting the information from the first databases and
writing it to the last database listed on the command line. This
operation can be considered analogous to copying files into a directory.
This is slower than a direct cp
command, but has the advantage
of merging several databases together and the resulting database will
have been garbage collected. That is, any fragmentation in the original
databases is removed (as much as is possible).
NOTE: Care should be taken when merging database. No checks are performed to make sure that the databases do not already contain the same readings. Thus attempting to copy the same database several times will cause problems later on. No merging of vector, clone or template information is performed either.
-v
To merge database X with database Y to give a new database Z use:
copy_db X.0 Y.0 Z.0
To copy a database quickly without garbage collecting the UNIX cp
command can be used as follows. This copies version F of database DB to
version T of database XYZZY.
cp DB.F XYZZY.T; cp DB.F.aux XYZZY.T.aux
Care must be taken to check for the busy file (`DB.F.BUSY') before making the copy. If the database is written to during the operation of the copy command then the new database may be corrupted.