DBSCAN(1) General Commands Manual DBSCAN(1)

# [NAME](#NAME)

dbscan - scans a Directory Server database index file and dumps the contents

# [SYNOPSIS](#SYNOPSIS)

**dbscan** **-f &lt;filename&gt;** \[*-R*] \[*-t &lt;size&gt;*] \[*-K &lt;entry\_id&gt;*] \[*-k &lt;key&gt;*] \[*-l &lt;size&gt;*] \[*-G &lt;n&gt;*] \[*-n*] \[*-r*] \[*-s*]

# [DESCRIPTION](#DESCRIPTION)

Scans a Directory Server database index file and dumps the contents.

# [OPTIONS](#OPTIONS)

A summary of options is included below:

common options:

[**-A, --ascii**](#A,)

dump as ascii data

[**-D, --db-type &lt;filename&gt;**](#D,)

specify db type: bdb or mdb

[**-f, --dbi &lt;filename&gt;**](#f,)

specify db instance

[**-R, --raw**](#R,)

dump as raw data

[**-t, --truncate-entry &lt;size&gt;**](#t,)

entry truncate size (bytes)

entry file options:

[**-K, --entry-id &lt;entry\_id&gt;**](#K,)

lookup only a specific entry id

index file options:

[**-G, --id-list-min-size &lt;n&gt;**](#G,)

only display index entries with more than &lt;n&gt; ids

[**-I, --import &lt;file&gt;**](#I,)

Import database instance from file. Requires --do-it parameter WARNING! Only the id2entry and replication\_changelog database instances may be imported by dbscan.

[**-k, --key &lt;key&gt;**](#k,)

lookup only a specific key

[**-l, --id-list-max-size &lt;size&gt;**](#l,)

max length of dumped id list (default 4096; 40 bytes &lt;= size &lt;= 1048576 bytes)

[**-n, --show-id-list-lenghts**](#n,)

display ID list lengths

[**--remove**](#remove)

remove a db instance. Requires --do-it parameter

[**-r, --show-id-list**](#r,)

display the contents of ID list

[**-S, --stats**](#S,)

display statistics

[**-X, --export &lt;file&gt;**](#X,)

Export database instance to file

other options:

[**-s, --summary**](#s,)

Summary of index counts

[**-L, --list**](#L,)

List od database instances

[**--do-it**](#do)

confirmation required for actions that change the database contents

[**-h, --help-it**](#h,)

display the usage

# [USAGE](#USAGE)

Sample usages:

[List the database instances](#List)

**dbscan -L /var/lib/dirsrv/slapd-supplier1/db**

[Dump the entry file:](#Dump)

**dbscan -f id2entry.db4**

[Display index keys in cn.db4:](#Display)

**dbscan -f cn.db4**

[Display index keys in cn on lmdb:](#Display~2)

**dbscan -f /var/lib/dirsrv/slapd-supplier1/db/userroot/cn.db**  
(Note: Use **dbscan -L db\_home\_dirget the db instance path)**

[Display index keys and the count of entries having the key in mail.db4:](#Display~3)

**dbscan -r -f mail.db4**

[Display index keys and the IDs having more than 20 IDs in sn.db4:](#Display~4)

**dbscan -r -G 20 -f sn.db4**

[Display summary of objectclass.db4:](#Display~5)

**dbscan -s -f objectclass.db4**

# [AUTHOR](#AUTHOR)

dbscan was written by the 389 Project.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to https://github.com/389ds/389-ds-base/issues/new

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2001 Sun Microsystems, Inc. Used by permission.  
Copyright © 2017 Red Hat, Inc.  
This manual page was written by Michele Baldessari &lt;michele@pupazzo.org&gt;, for the Debian project (but may be used by others).  
This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution.

March 31, 2017

---

Document: dbscan(1) from 389-ds-base 3.3.1-r8 (Chainguard OS)
Source: https://github.com/389ds/389-ds-base.git
