LX0-104 · Question #142
When two databases are defined in slapd.conf, which of the following commands will provide a full dump of the second database?
The correct answer is A. slapcat -n 2. To dump the second database when multiple databases are defined in slapd.conf, use slapcat -n 2.
Question
Options
- Aslapcat -n 2
- Bslapcat -2
- Cslapcat -database 2
- Dslap_dumpall -name nameofdatabase
How the community answered
(20 responses)- A95% (19)
- D5% (1)
Why each option
To dump the second database when multiple databases are defined in `slapd.conf`, use `slapcat -n 2`.
The `slapcat -n <db_number>` option allows administrators to select a specific database instance to dump when multiple databases are configured. The `<db_number>` corresponds to the index of the database as defined in the `slapd.conf` file, where '2' would refer to the second database in the configuration order.
`slapcat -2` is not a valid option for specifying the second database; the correct option is `-n` followed by the number.
`slapcat -database 2` uses an incorrect option name; the correct option for specifying the database number is `-n`, not `-database`.
`slap_dumpall` is not a standard OpenLDAP command, and `slapcat` does not use a `-name` option for database selection.
Concept tested: OpenLDAP multi-database dump
Source: https://www.openldap.org/software/man.cgi?query=slapcat&sektion=1&apropos=0&manpath=OpenLDAP+2.4-Release
Topics
Community Discussion
No community discussion yet for this question.