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


rootReplaceDb

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

This function replaces the contents of the given db with those taken from the corresponding host .db file.

The result is similar to that obtainable by doing a rootRemoveDb followed immediately by a matching rootImportDb, except that doing a rootReplaceDb instead will usually leave intact pointers from outside the db into it, whereas the former sequence is guaranteed to set all such pointers to nil.

root:
[ .db["mydb"] | rootReplaceDb ]pop
root:

The rootReplaceDb may be used to either upgrade or roll back ("downgrade"?) a db: It doesn't care which.

The replacement .db file must currently have (in the case of the above example) one of the names

muq-CURRENT-xyz.db
muq-CURRENT-xyz.db.gz
muq-CURRENT-xyz.db.lzo
muq-CURRENT-xyz.db.bz2

A future version of this function will probably allow specification of an arbitrary host filename (if not pathname) for the .db file.

See section rootRemoveDb. See section rootImportDb.


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