java com.sleepycat.je.util.DbLoad -h <dir> # environment home directory [-f <fileName>] # input file [-n ] # no overwrite mode [-T] # input file is in text mode [-I] # ignore unknown parameters [-c name=value] # config values [-s <databaseName> ] # database to load [-v] # show progress [-V] # print JE version numberSee {@link DbLoad#main} for a full description of the command line arguments. To load a database to a stream from code:
DbLoad loader = new DbLoad(); loader.setEnv(env); loader.setDbName(dbName); loader.setInputStream(stream); loader.setNoOverwrite(noOvrwr); loader.setTextFileMode(tfm); loader.load();
Because a DATA=END
marker is used to terminate the dump of each database, multiple databases can be dumped and loaded using a single stream. The {@link DbDump#dump} method leaves the stream positioned afterthe last line written and the {@link DbLoad#load} method leaves the streampositioned after the last line read.
|
|