Re: rebuilding (RewriteMap) databases

[email protected] Thu, 14 May 2026 10:12:37 -0400
Newsgroups gmane.comp.apache.user
Message-ID <[email protected]>
--Apple-Mail=_09651C09-0036-445D-B87D-95B66E2769CE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8


> Jos,
>=20
> You need to regenerate your DBM files from the original text source
> files using the httxt2dbm utility that ships with httpd.
>=20
> If your RewriteMap directive looks something like:
>=20
>     RewriteMap mymap "dbm:/path/to/mapfile.map"
>=20
> Then you should have a corresponding text file (e.g. mapfile.txt) with
> your key-value pairs, one per line, space-separated:
>=20
>     key1 value1
>     key2 value2
>=20
> Rebuild it with:
>=20
>     httxt2dbm -i /path/to/mapfile.txt -o /path/to/mapfile.map
>=20
> That's it. The httxt2dbm utility will use whatever DBM library httpd =
was
> built against (which, after your FreeBSD upgrade, is now the base libc
> BerkeleyDB 1 instead of the ports BerkeleyDB 5).
>=20
> If you have multiple RewriteMap DBM files, repeat for each one.
>=20
> After rebuilding, do a graceful restart to pick up the new files:
>=20
>     apachectl graceful
>=20
> Note: if you don't still have the original text source files, you'll
> need to recreate them. The old DBM files in the deprecated format =
can't
> be read by the new library, which is why the rebuild is necessary.
>=20
> --Rich
> [email protected]


=E2=80=94=20
Rich Bowen
[email protected]





--Apple-Mail=_09651C09-0036-445D-B87D-95B66E2769CE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" =
content=3D"text/html; charset=3Dutf-8"></head><body =
style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; =
line-break: after-white-space;"><div =
class=3D"Apple-Mail-URLShareUserContentTopClass"><br></div><div =
class=3D"Apple-Mail-URLShareWrapperClass" style=3D"position: relative =
!important;"><blockquote type=3D"cite" style=3D"border-left-style: none; =
color: inherit; padding: inherit; margin: inherit;">

Jos,<br><br>You need to regenerate your DBM files from the original text =
source<br>files using the httxt2dbm utility that ships with =
httpd.<br><br>If your RewriteMap directive looks something =
like:<br><br><span =
class=3D"Apple-converted-space">&nbsp;&nbsp;&nbsp;</span> RewriteMap =
mymap "dbm:/path/to/mapfile.map"<br><br>Then you should have a =
corresponding text file (e.g. mapfile.txt) with<br>your key-value pairs, =
one per line, space-separated:<br><br><span =
class=3D"Apple-converted-space">&nbsp;&nbsp;&nbsp;</span> key1 =
value1<br><span class=3D"Apple-converted-space">&nbsp;&nbsp;&nbsp;</span> =
key2 value2<br><br>Rebuild it with:<br><br><span =
class=3D"Apple-converted-space">&nbsp;&nbsp;&nbsp;</span> httxt2dbm -i =
/path/to/mapfile.txt -o /path/to/mapfile.map<br><br>That's it. The =
httxt2dbm utility will use whatever DBM library httpd was<br>built =
against (which, after your FreeBSD upgrade, is now the base =
libc<br>BerkeleyDB 1 instead of the ports BerkeleyDB 5).<br><br>If you =
have multiple RewriteMap DBM files, repeat for each one.<br><br>After =
rebuilding, do a graceful restart to pick up the new files:<br><br><span =
class=3D"Apple-converted-space">&nbsp;&nbsp;&nbsp;</span> apachectl =
graceful<br><br>Note: if you don't still have the original text source =
files, you'll<br>need to recreate them. The old DBM files in the =
deprecated format can't<br>be read by the new library, which is why the =
rebuild is necessary.<br><br>--Rich<br>[email protected]

</blockquote></div><br><br><div>
<meta charset=3D"UTF-8"><div dir=3D"auto" style=3D"caret-color: rgb(0, =
0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;"><div>=E2=80=94&nbsp;</div><div>Rich =
Bowen</div><div>[email protected]</div><div><br></div></div><br =
class=3D"Apple-interchange-newline"><br =
class=3D"Apple-interchange-newline">
</div>
<br></body></html>=

--Apple-Mail=_09651C09-0036-445D-B87D-95B66E2769CE--