Go to the first, previous, next, last section, table of contents.


Function: rootImportDb { [dbId] -> [dbId] }
file: job.t
package: muf
status: alpha

This function accepts a db designation, either as a (typically four-letter) string or as an integer, and attempts to import the corresponding host .db file:

[ "xyz" | rootImportDb ]pop

The above command will search for host files under the names


and load the first one found, uncompressing as needed (presuming the appropriate decompression program can be located).

If the imported db contains pointers to objects in other dbs which existed on the exporting system but are missing from the current server, such pointers will be replaced by nils. If these pointers occurred in critical spots, these substitutions may cripple index or other datastructures in the db, or even crash the server later on.

Also, it is relatively easy for the imported db to forge pointers to objects it would not normally be able to access.

In general, Muq is not currently intended to be secure or stable in the face of importation of maliciously constructed .db files: You should import .db files only from reasonably trusted sources.

A future version of this function should probably optionally accept a full host filename as input argument.

If the db in question already exists within the server, you must use rootReplaceDb instead of rootImportDb. (It would be easy enough to combine these into one function, but keeping them separate may reduce the incidence of unfortunate accidents.)

See section rootReplaceDb.

Go to the first, previous, next, last section, table of contents.