,IABerkeley DB Reference Guide: Dumping and Reloading[P;

Berkeley DB Reference Guide: Dumping and Reloading



)

Dump output formats



ŽThere are two output formats used by db_dump and db_dump185.

HIn both output formats, the first few lines of the output contain headerIinformation describing the underlying access method, filesystem page sizeAand other bookkeeping information. This information is output inEname=value pairs, where name may be any of the keywordshlisted in the db_load manual page, and value will be itsGvalue. While this header information can be manually edited before theIdatabase is reloaded, there is rarely any reason to do so, as all of thisIinformation can also be specified or overridden by command-line arguments4to db_load.

JFollowing the header information are the key/data pairs from the database.IIf the database being dumped is of type Btree or Hash, the output will beGpaired lines of text, where the first line of the pair is the key item,Gand the second line of the pair is its corresponding data item. If theIdatabase being dumped is of type Recno, the output will be lines of text,7where each line is the next data item for the database.

†If the -p option to db_dump or db_dump185 wasLspecified, the key/data lines will consist of single characters representingDany characters from the database that are printing characters9and backslash \ escaped characters for any that were not.GBackslash characters appearing in the output mean one of two things: ifFthe backslash character precedes another backslash character, it meansHthat a literal backslash character occurred in the key or data item. IfBthe backslash character precedes any other character, the next twoGcharacters must be interpreted as hexadecimal specification of a single8character, e.g., \0a is a newline character in the ASCIIcharacter set.

IAlthough some care should be exercised, it is perfectly reasonable to useBstandard text editors and tools to edit databases dumped using theb-p option before re-loading them using the db_loadutility.

HNote that the definition of a printing character may vary from system toCsystem, and so database representations created using the -p:option may be less portable than those created without it.

…If the -p option to db_dump or db_dump185 isJnot specified, each output line will consist of paired hexadecimal values,Ee.g., the line 726f6f74 is the string root in the ASCIIcharacter set.

GIn all output formats, a single newline character ends both the key and data items.

OALÿÿ