.\" Title: dbd
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 23 Dec 2009
-.\" Manual: Netatalk 2.1
-.\" Source: Netatalk 2.1
+.\" Date: 14 Sep 2012
+.\" Manual: Netatalk 3.0
+.\" Source: Netatalk 3.0
.\" Language: English
.\"
-.TH "DBD" "1" "23 Dec 2009" "Netatalk 2.1" "Netatalk 2.1"
+.TH "DBD" "1" "14 Sep 2012" "Netatalk 3.0" "Netatalk 3.0"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
-dbd \- CNID database maintanance
+dbd \- CNID database maintenance
.SH "SYNOPSIS"
.HP \w'\fBdbd\fR\fB\fR\ 'u
-\fBdbd\fR\fB\fR [\-evx] {\-d\ [\-i] | \-s\ [\-c|\-n] | \-r\ [\-c|\-f] | \-u} \fIvolumepath\fR
+\fBdbd\fR\fB\fR [\-evx] {\-d\ [\-i] | \-s\ [\-c|\-n] | \-r\ [\-c|\-f|\-C] | \-u} \fIvolumepath\fR
.SH "DESCRIPTION"
.PP
\fBdbd\fR
can dump, scan, reindex and rebuild
\fINetatalk\fR
dbd CNID databases\&. It must be run with appropiate permissions i\&.e\&. as root\&.
+\fBdbd\fR
+\fB\-s|\-r\fR
+can be run on active volumes, but
+\fBdbd \-rf\fR, which wipes the db before rebuilding it, checks and enforces that the chosen volume is not in use\&.
.SH "COMMANDS"
.PP
\-d
.RS 4
Scan volume:
.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Compare CNIDs in database with volume
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Test if \&.AppleDouble directories exist
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Test if AppleDouble files exist
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Report orphaned AppleDouble files
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Report directories inside \&.AppleDouble directories
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Check name encoding by roundtripping, log on error
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Check for orphaned CNIDs in database (requires
-\fB\-e\fR)
-.RE
+Compare CNIDs in database with volume, test if \&.AppleDouble directories exist, test if AppleDouble files exist, report orphaned AppleDouble files, report directories inside \&.AppleDouble directories, check name encoding, heck for orphaned CNIDs in database (requires
+\fB\-e\fR)\&.
.sp
+Options:
+.PP
+\-c
.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Open and close adouble files
+Don\'t check \&.AppleDouble stuff, only check orphaned\&.
.RE
-.RS 4
.PP
-Options:
+\-n
.RS 4
-\fB\-c\fR
-Don\'t check \&.AppleDouble stuff, only check orphaned\&.
-
-\fB\-n\fR
Don\'t open CNID database, skip CNID checks, only traverse filesystem
.RE
.RE
.PP
\-r
.RS 4
-Rebuild volume\&. With
-\fB\-f\fR
-wipe database and rebuild from CNIIDs stored in AppleDouble files\&.
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Sync CNIDSs from database with volume
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Ensure \&.AppleDouble directories exist
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Ensure AppleDouble files exist
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Delete orphaned AppleDouble files
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Report directories inside \&.AppleDouble directories
-.RE
+Rebuild volume:
.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Check name encoding by roundtripping, log on error
-.RE
+Sync CNIDSs from database with volume, ensure \&.AppleDouble directories exist, ensure AppleDouble files exist, delete orphaned AppleDouble files, report directories inside \&.AppleDouble directories, check name encoding by roundtripping, delete orphaned CNIDs in database (requires
+\fB\-e\fR)\&.
.sp
+Options:
+.PP
+\-C
.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Delete orphaned CNIDs in database (requires
-\fB\-e\fR)
+Converts volume from adouble:v2 to adouble:ea
.RE
-.sp
+.PP
+\-c
.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Open and close adouble files
+Don\'t create \&.AppleDouble stuff, only cleanup orphaned\&.
.RE
-.RS 4
.PP
-Options:
+\-f
.RS 4
-\fB\-c\fR
-Don\'t create \&.AppleDouble stuff, only cleanup orphaned\&.
-
-\fB\-f\fR
Wipe database and rebuild from IDs stored in AppleDouble files, only available for volumes without
\fBnocnidcache\fR
option\&. Implies
.PP
\-u
.RS 4
-Prepare upgrade:
+Upgrade:
.sp
-Before installing an upgraded version of Netatalk that is linked against a newer BerkeleyDB lib, run `dbd \-u \&.\&.\&.` from the OLD Netatalk pior to upgrading on all volumes\&. This removes the BerkleyDB environment\&. On exit cnid_dbd does this automatically, so normally calling dbd \-u should not be necessary !
+Opens the database which triggers any necessary upgrades, then closes and exits\&.
.RE
.SH "OPTIONS"
.PP