c-icap-mods-sguardDB - Man Page

simple utility to create SquidGuard like databases

Synopsis

c-icap-mods-sguardDB [ -h ] [ -d debug_level ] [ -db path ] [ -f urls|domains ] [ -C ] [ -T bdb|lmdb ] [ -S max-size ] [ -u ] [ -s url ] [ --dump ]

Description

c-icap-mods-sguardDB utility can be used to create SquidGuard like databases which can be used with url_check service. The SquidGuard like databases allow fast search of urls/sub-urls and domains/sub-domains in sorted (eg b-trees) databases.

The utility can build and use lmdb or BerkeleyDB based databases.

Options

-h

Show a help message

-d debug_level

The debug level to use

-db path

The database path

-f urls|domains

Select the sub-database (urls or domains) to operate.

-C

Create mode. Create the database using the "domains" and "urls" files exist under the database directory.

-T bdb|lmdb

Force BerkeleyDB or LMDB database type when building new database. By default, if the utility is compiled with LMDB databases support, an LMDB database is built.

-S max-size

This option has effect only if an LMDB database is going to be built. Sets the maximum database size.

-u

Update mode. Update the database using the "domains.diff" and "urls.diff" files exist under the database directory. Each diff file consist by lines starting from "+" to mark a url or a domain to be added to the database or "-" to mark a domain or url to be removed from database.

-s url

Search in the database for a url or domain matches the given url

--dump

Dump the database to stdout

Examples

c-icap-mods-sguardDB -C -db /url/local/blacklists-toulouse/porn/

It builds the SquidGuard databases under the /url/local/blacklists-toulouse/porn directory using the urls and domains files exist under the same directory.

c-icap-mods-sguardDB -u -db /url/local/blacklists-toulouse/porn/

updates the SquidGuard databases under the /url/local/blacklists-toulouse/porn directory using the urls.diff and domains.diff files exist under the same directory.

See Also

c-icap(8)

Author

Tsantilas Christos

Info

c_icap_modules master-fd1a1b7