{
    "mode": "man",
    "parameter": "DB5.3_LOAD",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/DB5.3_LOAD/1/json",
    "generated": "2026-11-11T07:18:14Z",
    "synopsis": "db5.3load  [-nTV] [-c name=value] [-f file] [-h home] [-P password] [-t btree | hash | queue\n| recno] file\ndb5.3load [-r lsn | fileid] [-h home] [-P password] file",
    "sections": {
        "NAME": {
            "content": "db5.3load - Load data from standard input\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "db5.3load  [-nTV] [-c name=value] [-f file] [-h home] [-P password] [-t btree | hash | queue\n| recno] file\n\ndb5.3load [-r lsn | fileid] [-h home] [-P password] file\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The db5.3load utility reads from the standard input and loads it into the database file. The\ndatabase file is created if it does not already exist.\n\nThe input to db5.3load must be in the output format specified  by  the  db5.0dump  utility,\nutilities, or as specified for the -T below.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-c",
                    "content": "The command-line format is name=value.  See the Supported Keywords section below for a\nlist of keywords supported by the -c option.\n",
                    "flag": "-c"
                },
                {
                    "name": "-f",
                    "content": "",
                    "flag": "-f"
                },
                {
                    "name": "-h",
                    "content": "If a home directory is  specified,  the  database  environment  is  opened  using  the\nDBINITLOCK,  DBINITLOG,  DBINITMPOOL,  DBINITTXN,  and DBUSEENVIRON flags to\nDBENV->open.  (This means that db5.3load can be used to  load  data  into  databases\nwhile  they  are  in use by other processes.) If the DBENV->open call fails, or if no\nhome directory is specified, the database is still updated, but the environment is ig‐\nnored; for example, no locking is done.\n",
                    "flag": "-h"
                },
                {
                    "name": "-n",
                    "content": "database.   If  a  key/data pair cannot be loaded into the database for this reason, a\nwarning message is displayed on the standard error output, and the key/data  pair  are\nskipped.\n",
                    "flag": "-n"
                },
                {
                    "name": "-P",
                    "content": "strings as soon as possible, be aware there may be a window of vulnerability  on  sys‐\ntems  where  unprivileged  users can see command-line arguments or where utilities are\nnot able to overwrite the memory containing the command-line arguments.\n",
                    "flag": "-P"
                },
                {
                    "name": "-r",
                    "content": "All database pages in transactional environments contain references  to  the  environ‐\nment's  log  records.   In order to copy a database into a different database environ‐\nment, database page references to the old environment's log  records  must  be  reset,\notherwise  data corruption can occur when the database is modified in the new environ‐\nment.  The -r lsn option resets a database's log sequence numbers.\n\nAll databases contain an ID string used to identify the database in the database envi‐\nronment cache.  If a database is copied, and used in the same environment  as  another\nfile  with  the  same ID string, corruption can occur.  The -r fileid  option resets a\ndatabase's file ID to a new value.\n\nIn both cases, the physical file specified by the file argument is modified in-place.\n",
                    "flag": "-r"
                },
                {
                    "name": "-T      -T",
                    "content": "bases.\n\nIf the database to be created is of type Btree or Hash, or the keyword keys is  speci‐\nfied  as set, the input must be paired lines of text, where the first line of the pair\nis the key item, and the second line of the pair is its corresponding data  item.   If\nthe  database to be created is of type Queue or Recno and the keyword keys is not set,\nthe input must be lines of text, where each line is a new data item for the database.\n\nA simple escape mechanism, where newline and backslash (\\) characters are special,  is\napplied  to  the text input.  Newline characters are interpreted as record separators.\nBackslash characters in the text will be interpreted in one of two ways: If the  back‐\nslash  character precedes another backslash character, the pair will be interpreted as\na literal backslash.  If the backslash character precedes any other character, the two\ncharacters following the backslash will be interpreted as a hexadecimal  specification\nof  a single character; for example, \\0a is a newline character in the ASCII character\nset.\n\nFor this reason, any backslash or newline characters that naturally occur in the  text\ninput must be escaped to avoid misinterpretation by db5.3load.\n\nIf the -T option is specified, the underlying access method type must be specified us‐\ning the -t option.\n",
                    "flag": "-T"
                },
                {
                    "name": "-t      -t",
                    "content": "be loaded into a database of the same type as was dumped; for example, a Hash database\nwill be created if a Hash database was dumped.\n\nBtree  and  Hash  databases  may  be converted from one to the other.  Queue and Recno\ndatabases may be converted from one to the other.  If the -k option was  specified  on\nthe  call  to  db5.3dump  then Queue and Recno databases may be converted to Btree or\nHash, with the key being the integer record number.\n",
                    "flag": "-t"
                },
                {
                    "name": "-V",
                    "content": "The db5.3load utility may be used with a Berkeley DB environment (as described  for  the  -h\noption,  the environment variable DBHOME, or because the utility was run in a directory con‐\ntaining a Berkeley DB environment).  In order to avoid environment corruption  when  using  a\nBerkeley  DB environment, db5.3load should always be given the chance to detach from the en‐\nvironment and exit gracefully.  To cause db5.3load to release all environment resources  and\nexit cleanly, send it an interrupt signal (SIGINT).\n\nThe  db5.3load  utility  exits 0 on success, 1 if one or more key/data pairs were not loaded\ninto the database because the key already existed, and >1 if an error occurs.\n",
                    "flag": "-V"
                }
            ]
        },
        "EXAMPLES": {
            "content": "The db5.3load utility can be used to load text files into databases.  For example, the  fol‐\nlowing  command loads the standard UNIX /etc/passwd file into a database, with the login name\nas the key item and the entire password entry as the data item:\n\nawk -F: '{print $1; print $0}' < /etc/passwd |\nsed 's/\\\\/\\\\\\\\/g' | db5.3load -T -t hash passwd.db\n\nNote that backslash characters naturally occurring in the text are escaped to avoid interpre‐\ntation as escape characters by db5.3load.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "DBHOME\nIf the -h option is not specified and the environment variable DBHOME is set,  it  is\nused as the path of the database home, as described in DBENV->open.\n",
            "subsections": []
        },
        "SUPPORTED KEYWORDS": {
            "content": "The following keywords are supported for the -c command-line ption to the db5.3load utility.\nSee DB->open for further discussion of these keywords and what values should be specified.\n\nThe parenthetical listing specifies how the value part of the name=value pair is interpreted.\nItems  listed as (boolean) expect value to be 1 (set) or 0 (unset).  Items listed as (number)\nconvert value to a number.  Items listed as (string) use the string value  without  modifica‐\ntion.\n\nbtminkey (number)\nThe minimum number of keys per page.\n\nchksum (boolean)\nEnable page checksums.\n\ndatabase (string)\nThe database to load.\n\ndblorder (number)\nThe byte order for integers in the stored database metadata.\n\ndbpagesize (number)\nThe size of database pages, in bytes.\n\nduplicates (boolean)\nThe value of the DBDUP flag.\n\ndupsort (boolean)\nThe value of the DBDUPSORT flag.\n\nextentsize (number)\nThe size of database extents, in pages, for Queue databases configured to use extents.\n\nhffactor (number)\nThe density within the Hash database.\n\nhnelem (number)\nThe size of the Hash database.\n\nkeys (boolean)\nSpecify whether keys are present for Queue or Recno databases.\n\nrelen (number)\nSpecify fixed-length records of the specified length.\n\nrepad (string)\nSpecify the fixed-length record pad character.\n\nrecnum (boolean)\nThe value of the DBRECNUM flag.\n\nrenumber (boolean)\nThe value of the DBRENUMBER flag.\n\nsubdatabase (string)\nThe subdatabase to load.\n\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Sleepycat  Software,  Inc.  This  manual page was created based on the HTML documentation for\ndbload from Sleepycat, by Thijs Kinkhorst <thijs@kinkhorst.com>, for the Debian system  (but\nmay be used by others).\n\n22 November 2009                             DB5.3LOAD(1)",
            "subsections": []
        }
    },
    "summary": "db5.3load - Load data from standard input",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "The command-line format is name=value. See the Supported Keywords section below for a list of keywords supported by the -c option."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-h",
            "long": null,
            "arg": null,
            "description": "If a home directory is specified, the database environment is opened using the DBINITLOCK, DBINITLOG, DBINITMPOOL, DBINITTXN, and DBUSEENVIRON flags to DBENV->open. (This means that db5.3load can be used to load data into databases while they are in use by other processes.) If the DBENV->open call fails, or if no home directory is specified, the database is still updated, but the environment is ig‐ nored; for example, no locking is done."
        },
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": "database. If a key/data pair cannot be loaded into the database for this reason, a warning message is displayed on the standard error output, and the key/data pair are skipped."
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": "strings as soon as possible, be aware there may be a window of vulnerability on sys‐ tems where unprivileged users can see command-line arguments or where utilities are not able to overwrite the memory containing the command-line arguments."
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "All database pages in transactional environments contain references to the environ‐ ment's log records. In order to copy a database into a different database environ‐ ment, database page references to the old environment's log records must be reset, otherwise data corruption can occur when the database is modified in the new environ‐ ment. The -r lsn option resets a database's log sequence numbers. All databases contain an ID string used to identify the database in the database envi‐ ronment cache. If a database is copied, and used in the same environment as another file with the same ID string, corruption can occur. The -r fileid option resets a database's file ID to a new value. In both cases, the physical file specified by the file argument is modified in-place."
        },
        {
            "flag": "-T",
            "long": null,
            "arg": null,
            "description": "bases. If the database to be created is of type Btree or Hash, or the keyword keys is speci‐ fied as set, the input must be paired lines of text, where the first line of the pair is the key item, and the second line of the pair is its corresponding data item. If the database to be created is of type Queue or Recno and the keyword keys is not set, the input must be lines of text, where each line is a new data item for the database. A simple escape mechanism, where newline and backslash (\\) characters are special, is applied to the text input. Newline characters are interpreted as record separators. Backslash characters in the text will be interpreted in one of two ways: If the back‐ slash character precedes another backslash character, the pair will be interpreted as a literal backslash. If the backslash character precedes any other character, the two characters following the backslash will be interpreted as a hexadecimal specification of a single character; for example, \\0a is a newline character in the ASCII character set. For this reason, any backslash or newline characters that naturally occur in the text input must be escaped to avoid misinterpretation by db5.3load. If the -T option is specified, the underlying access method type must be specified us‐ ing the -t option."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "be loaded into a database of the same type as was dumped; for example, a Hash database will be created if a Hash database was dumped. Btree and Hash databases may be converted from one to the other. Queue and Recno databases may be converted from one to the other. If the -k option was specified on the call to db5.3dump then Queue and Recno databases may be converted to Btree or Hash, with the key being the integer record number."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": "The db5.3load utility may be used with a Berkeley DB environment (as described for the -h option, the environment variable DBHOME, or because the utility was run in a directory con‐ taining a Berkeley DB environment). In order to avoid environment corruption when using a Berkeley DB environment, db5.3load should always be given the chance to detach from the en‐ vironment and exit gracefully. To cause db5.3load to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT). The db5.3load utility exits 0 on success, 1 if one or more key/data pairs were not loaded into the database because the key already existed, and >1 if an error occurs."
        }
    ],
    "examples": [
        "The db5.3load utility can be used to load text files into databases.  For example, the  fol‐",
        "lowing  command loads the standard UNIX /etc/passwd file into a database, with the login name",
        "as the key item and the entire password entry as the data item:",
        "awk -F: '{print $1; print $0}' < /etc/passwd |",
        "sed 's/\\\\/\\\\\\\\/g' | db5.3load -T -t hash passwd.db",
        "Note that backslash characters naturally occurring in the text are escaped to avoid interpre‐",
        "tation as escape characters by db5.3load."
    ],
    "see_also": [],
    "tldr": {
        "source": "not_found",
        "examples": []
    }
}