NAME
nrsdbtoyaml - Extract records from Net::Radius::Server::DBStore
SYNOPSIS
nrsdbtoyaml [--delete] [--sync] {--all|--key key|--full}
[--frozen] [--filter regexp] [--help] -- <BerkeleyDB params>
# or for more complicated scenarios...
perl -MMLDBM=DB_File,Storable /usr/bin/nrsdbtoyaml --full \\
-- MLDBM::Sync $DB_FILE
DESCRIPTION
nrsdbtoyaml allows the extraction of either single records or complete dumps of databases created by Net::Radius::Server::DBStore(3). Its output can then be fed to billing or accounting processes that act on the collected information.
The output is a YAML file, produced by YAML::Syck(3), thus YAML 1.0 compliant, where each extracted record will be re-serialized as YAML.
Note that you must feed configuration options that match whatever was used to generate the particular database being read.
Note that this includes the name of the database file to read. Note also that you must separate nrsdbtoyaml options from the underlying storage module options using --
, as explained in Getopt::Long(3).
- --delete
-
After dumping each tuple, delete it from the database.
- --sync
-
sync()
the database after each deletion. This trades in performance for correctness. - --full
-
Do a complete dump of the database. Probably only good for debugging.
- --all
-
Dump all tuples stored in the database.
- --key key
-
Only the tuple corresponding to this key will be printed. Multiple keys can be specified.
- --filter regexp
-
If specified, treats
regexp
as a Perl regular expression that must match the key in order for it to be processed. Multiple filters can be specified. In this case, all of them must match. - --frozen
-
Whether to use
thaw()
from Storable(3) on the recovered data or not. - --help
-
Produces this documentation.
The program will return a true value if no errors are found. Otherwise, an error code will be returned and a suitable error will be sent to STDERR
. The YAML output is sent to STDOUT
.
Your local configuration might include Radius packets among the data to be stored in the database. nrsdbtoyaml won't decode those. Instead, the packet will be returned as a string containing the packet data that was received.
LICENSE AND WARRANTY
This code and all accompanying software comes with NO WARRANTY. You use it at your own risk.
This code and all accompanying software can be used freely under the same terms as Perl version 5.8.6 itself.
AUTHOR
Luis E. Muñoz <luismunoz@cpan.org>
SEE ALSO
nrsd(1), perl(1), Getopt::Long(3), Net::Radius::Server(3), Net::Radius::Server::DBStore(3), YAML::Syck(3).
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 190:
Non-ASCII character seen before =encoding in 'Muñoz'. Assuming UTF-8