-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create man page for cnid2_create tool, GitHub#402
- Loading branch information
Showing
6 changed files
with
365 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<refentry id="cnid2_create.1"> | ||
<refmeta> | ||
<refentrytitle>cnid2_create</refentrytitle> | ||
|
||
<manvolnum>1</manvolnum> | ||
|
||
<refmiscinfo class="date">08 Aug 2023</refmiscinfo> | ||
|
||
<refmiscinfo class="source">:NETATALK_VERSION:</refmiscinfo> | ||
</refmeta> | ||
|
||
<refnamediv> | ||
<refname>cnid2_create</refname> | ||
|
||
<refpurpose>Convert CNID 1 database to CNID 2</refpurpose> | ||
</refnamediv> | ||
|
||
<refsynopsisdiv> | ||
<cmdsynopsis> | ||
<command>cnid2_create</command> | ||
|
||
<arg choice="plain"><replaceable>volume</replaceable></arg> | ||
</cmdsynopsis> | ||
</refsynopsisdiv> | ||
|
||
<refsect1> | ||
<title>DESCRIPTION</title> | ||
|
||
<para><command>cnid2_create</command> converts a CNID database created | ||
with Netatalk 1 to a CNID database compatible with Netatalk 2.</para> | ||
|
||
<note> | ||
<para>This section is borrowed with minor modification | ||
from the Upgrade guide in the Netatalk 2 manual.</para> | ||
</note> | ||
|
||
<para>The steps to upgrade depend on what version of Berkeley DB is | ||
installed on your system. If you already use one of the supported | ||
versions of Berkeley DB (4.1.25 or 4.2.52) for your old Netatalk | ||
installation and plan to use it for Netatalk 2 as well, just use the | ||
<command>db_dump</command> and <command>db_load</command> utilities that | ||
came with it as indicated below. Otherwise it is probably best to have | ||
the old and the new (to be used with Netatalk 2) version of Berkeley | ||
DB installed side by side until you have finished the upgrade. The | ||
reason for this is that we will dump out the old databases with the | ||
currently installed version of Berkeley DB in ASCII format and reload | ||
them with the new version. This avoids any incompatibility problems | ||
between Berkeley DB releases with respect to the on-disk format.</para> | ||
|
||
<para>For each volume to be upgraded, follow these steps <itemizedlist> | ||
<listitem> | ||
<para>Stop all afpd daemons accessing the volume.</para> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Change to the database directory for that volume, most | ||
likely the <filename>.AppleDB</filename> subdirectory of the | ||
volume toplevel directory in question.</para> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Dump the contents of <filename>cnid.db</filename> and | ||
<filename>didname.db</filename> using the old (installed) version | ||
of Berkeley DB like this:</para> | ||
|
||
<programlisting> db_dump -f cnid.dump cnid.db | ||
db_dump -f didname.dump didname.db</programlisting> | ||
|
||
<para>Make sure the db_dump utility you are using is the correct | ||
(currently used) one. Use the full path to the db_dump executable | ||
if in doubt. So if this database was created with Berkeley DB 3.xx | ||
installed in <filename>/usr/local/db3</filename> use | ||
<filename>/usr/local/db3/bin/db_dump</filename> instead. This will | ||
create two files, <filename>cnid.dump</filename> and | ||
<filename>didname.dump</filename> in the current directory.</para> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Run the cnid2_create script:</para> | ||
|
||
<programlisting> cnid2_create </programlisting> | ||
|
||
<para>The script assumes that <filename>.AppleDB</filename> is a | ||
subdirectory of the volume directory to be upgraded. If that is | ||
not the case give the full path name of the volume as the first | ||
argument to <command>cnid2_create</command>. The script will | ||
create a file <filename>cnid2.dump</filename> in ASCII | ||
format.</para> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Remove the old Berkeley DB environment and logfiles (if | ||
present):</para> | ||
|
||
<programlisting> rm __db.* log.*</programlisting> | ||
</listitem> | ||
|
||
<listitem> | ||
<para>Load <filename>cnid2.dump</filename> into the new database. | ||
You should use the <command>db_load</command> utility of Berkeley | ||
DB that will be used with version 2 of Netatalk. So if Berkeley | ||
DB 4.xx lives in <filename>/usr/local/db4</filename> use</para> | ||
|
||
<programlisting> /usr/local/db4/bin/db_load -f cnid2.dump cnid2.db </programlisting> | ||
|
||
<para>This will create the new database file, | ||
<filename>cnid2.db</filename>. Remove the old database files | ||
<filename>cnid.db</filename>, <filename>didname.db</filename> and | ||
<filename>devino.db</filename>. The intermediate files | ||
<filename>cnid.dump</filename>, <filename>didname.dump</filename> | ||
and <filename>cnid2.dump</filename> can be removed now or at some | ||
later time.</para> | ||
</listitem> | ||
</itemizedlist></para> | ||
|
||
<para>If you do not want to have two versions of Berkeley DB installed | ||
side by side during the upgrade, you should first dump out the old | ||
databases as indicated above for all volumes, upgrade Berkeley DB and | ||
then load them with db_load. The <command>cnid2_create</command> script | ||
can be run before or after the upgrade. Berkeley DB environment and | ||
logfiles should still be removed before running | ||
<command>db_load</command>.</para> | ||
</refsect1> | ||
|
||
<refsect1> | ||
<title>SEE ALSO</title> | ||
|
||
<para><citerefentry><refentrytitle>apple_dump</refentrytitle><manvolnum>1</manvolnum></citerefentry></para> | ||
<para><citerefentry><refentrytitle>dbd</refentrytitle><manvolnum>1</manvolnum></citerefentry></para> | ||
</refsect1> | ||
</refentry> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ Makefile | |
Makefile.in | ||
asip-status.1 | ||
afpldaptest.1 | ||
cnid2_create.1 | ||
uniconv.1 | ||
*.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.