rddbmgr
8
June 2018
Linux Audio Manual

# rddbmgr

Tool for managing Rivendell databases
Fred
Gleason
fredg@paravelsystems.com
Application Author

          rddbmgr
          OPTIONS

## Description

`rddbmgr` 8 is a command-line tool used for managing (creating, modifying and checking) Rivendell databases. When invoked without any options, `rddbmgr` 8 will attempt to connect to the database specified in `rd.conf` 5, print a single line summary of its status to standard output and then exit.

`rddbmgr` 8 can be invoked with one of three primary modes, as follows:

`--check`

  Check an existing Rivendell database for errors and inconsistencies.

`--create`

  Initialize a new Rivendell database in an empty database container.

`--modify`

  Modify the schema of an existing Rivendell database.

## General Options

The following options can be used with any of the commands:

`--mysql-hostname=`hostname

  Connect to the database on hostname. Default is to use the corresponding value found in the `[mySQL]` section of `rd.conf` 5.

`--mysql-loginname=`username

  Connect to the database as user username. Default is to use the corresponding value found in the `[mySQL]` section of `rd.conf` 5.

`--mysql-password=`password

  Connect to the database using password hostname. Default is to use the corresponding value found in the `[mySQL]` section of `rd.conf` 5.

`--mysql-database=`dbname

  Connect to the database named dbname. Default is to use the corresponding value found in the `[mySQL]` section of `rd.conf` 5.

`--mysql-driver=`driver

  Connect to the database using the driver Qt driver. Default is to use the corresponding value found in the `[mySQL]` section of `rd.conf` 5.

`--mysql-engine=`engine

  Use table engine engine when creating new DB tables. Default is to use the corresponding value found in the `[mySQL]` section of `rd.conf` 5.

`--mysql-charset=`charset

  Configure new tables to use character set charset. Default is to use the corresponding value found in the `[mySQL]` section of `rd.conf` 5.

`--mysql-collation=`collation

  Configure new tables to use collation collation. Default is to use the corresponding value found in the `[mySQL]` section of `rd.conf` 5.

## Consistency Checking and Audio Recovery

The `--check` switch causes `rddbmgr` 8 to run a series of consistency checks of an existing database and audio store. The database to be checked must at the native schema of the installed Rivendell version.

The following options can be used in conjunction with `--check`:

`--dump-cuts-dir=`dir-name

  Move any "orphaned" audio files found to the dir-name directory.

`--no`

  Automatically answer all interactive prompts with `No`.

`--orphan-group=`grp-name

  Move carts with missing/invalid GROUP information to the grp-name group.

`--rehash=`target

  Generate SHA-1 hashes from the specified files in the audio store and validate them against the values stored in the database. This is an inherently expensive operation that may require a significant amount of time to complete as each audio file to be checked must be opened and read in its entirety.

  The target value can be one of the following:

  Cart number --e.g. `123456`

    Check hashs for all cuts within the specified cart.

  Cart/cut specification --e.g. `123456_001`

    Check the hash for the specified cut.

  `ALL`

    Check hashes for all cuts in the audio store.

`--relink-audio=`dir-name

  Scan the files in the directory dir-name and copy/rename them into the Rivendell audio store if their SHA-1 hash matches that for one or more Rivendell cuts.

`--relink-audio-move`

  When given along with `--relink-audio`, move the audio data to the Rivendell audio store rather than copying it --i.e. copy the audio data, then delete the original.

`--yes`

  Automatically answer all interactive prompts with `Yes`.

## Database Creation

The `--create` switch causes `rddbmgr` 8 to initialize a new Rivendell database at the location specified by `rd.conf` 5 and/or the relevant general options (see above). The location so specified must contain an empty database, otherwise `rddbmgr` 8 will exit with an error.

When creating an empty database for initialization by `rddbmgr` 8, the following permissions should be enabled:

- Select

- Insert

- Update

- Delete

- Create

- Drop

- References

- Index

- Alter

- Create Temporary Tables

- Lock Tables

The following options can be used in conjunction with `--create`:

`--generate-audio`

  In addition to initializing a database, also generate the audio for the test-tone cart in the audio store.

`--set-schema=`schema

  Create a database with a schema of schema [integer], which must be between `242` and the native schema (inclusive).

`--set-version=`version

  Create a database with a schema appropriate for Rivendell version version [X.Y.Z], which must be between `2.10.0` and the native Rivendell version (inclusive).

If neither `--set-schema` nor `--set-version` options are given, the database created will have the native schema of the installed version of Rivendell.

## Database Modification

The `--modify` switch causes `rddbmgr` 8 to modify the schema of the indicated database, in accordance with the following options:

`--set-schema=`schema

  Change the database schema to schema [integer], which must be between `242` and the native schema (inclusive).

`--set-version=`version

  Change the database schema to that appropriate for Rivendell version version [X.Y.Z], which must be between `2.10.0` and the native Rivendell version (inclusive).

If neither `--set-schema` nor `--set-version` options are given, the database will be changed to native schema of the installed version of Rivendell.

When reverting the schema of a database, the contents of fields that do not exist in the reverted schema will be irrecoverably lost!

## See Also

rdmarkerset 8