Migrating a Database
The FreezeScript tool transformdb
migrates a database created by a Freeze map or evictor. It accomplishes this by comparing the "old" Slice definitions (i.e., the ones that describe the current contents of the database) with the "new" Slice definitions, and making whatever modifications are necessary to ensure that the transformed database is compatible with the new definitions.
This would be difficult to achieve by writing a custom transformation program because that program would require static knowledge of the old and new types, which frequently define many of the same symbols and would therefore prevent the program from being loaded. The transformdb
tool avoids this issue using an interpretive approach: the Slice definitions are parsed and used to drive the migration of the database records.
The tool supports two modes of operation:
- Automatic migration – the database is migrated in a single step using only the default set of transformations.
- Custom migration – you supply a script to augment or override the default transformations.
Topics