radsqlrelay(8)

radsqlrelay8

Relay sql queries to a central database server

Usage

radsqlrelay [-?] [-d sql_driver] [-b database] [-f file] [-h host] [-u user] [-P port] [-p password] [-1] [-x] file_path

Overview

radsqlrelay tails a SQL logfile and forwards the queries to a database server. Used to replicate accounting records to one (central) database, even if the database has extended downtime.

The SQL logfile is created by the rlm_sql module with the rlm_sql_null driver logging to disk.. The module must be configured in the radiusd server before you can use radsqlrelay.

Options

-?

Print usage help information.

-d sql_driver

Driver to use: mysql, pg, oracle.

-b database

Name of the database to use.

-f file

Read password from file, instead of command line.

-h host

Connect to host.

-u user

User for login.

-P port

Port number to use for connection.

-p password

Password to use when connecting to server.

-1

One-shot mode: push the file to database and exit.

-x

Turn on debugging.

file_path

The pathname of the SQL logfile to use.

Notes

Oracle driver

The command "radsqlrelay -d oracle -b db.domain.tld sql-relay" reads the database description stored in $TNS_ADMIN/tnsnames.ora:

db.domain.tld =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = db.domain.tld)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = <DB SID>)
    )
  )

Releases

11 releases since Debian 4.0 (Etch); the text changed 4 times.

  1. 4.0
  2. 5.0–6.0
  3. 7–8
  4. 9–10
  5. 11–Arch

-? since Debian 7 (Wheezy); -P since Debian 7 (Wheezy); -f since Debian 5.0 (Lenny); -x since Debian 7 (Wheezy).

Author

Nicolas Baradakis <[email protected]>

From freeradius 3.2.10-4 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.