24.102. taler-merchant-dbconfig(1)#
24.102.1. Name#
taler-merchant-dbconfig - configure Taler merchant database
24.102.2. Synopsis#
taler-merchant-dbconfig [–dry] [-c FILENAME] [-h] [-r] [-s] [-u USER]
24.102.3. Description#
taler-merchant-dbconfig is a simple shell script that configures the default local PostgreSQL cluster for use by the GNU Taler merchant. It creates missing roles/databases and initializes or migrates the schema by running taler-merchant-dbinit as the selected user. Existing data is preserved unless -r is specified. Run it as root, after stopping all Merchant services and backing up the database when upgrading.
Only connections of the form postgres:///NAME are supported, with letters,
digits, underscores, dots or hyphens in NAME. For remote databases or other
connection forms, provision the database separately and invoke
taler-merchant-dbinit with the correct configuration and database identity.
The script does not stop/start services or make backups.
Its options are as follows:
- –dry
Report pending role/database creation, permission setup, and schema or stored-procedure migrations without changing PostgreSQL state. Existing databases are inspected by invoking the corresponding dbinit tool with
--dryas the configured service user. Root and the service operating system account are still required, as for normal dbconfig operation.If the database or PostgreSQL role does not exist, report its creation followed by full initialization. Individual migrations are not enumerated until the target can be inspected. With
-s, omit initialization; combining--drywith-ris an error.Output is empty when current. Exit status is 0 when current, 2 when work is pending, and 1 on error. Database inspection failures are errors, not evidence that a database or role is missing.
- -c FILENAME
Read the database connection from FILENAME. The default is
/etc/taler-merchant/taler-merchant.conf; this file is not modified.- -h
Print short help on options.
- -r
Reset any existing database. Loses all existing data. DANGEROUS.
- -s
Skip database initialization. Useful if you want to run
taler-merchant-dbinitmanually.- -u USER
Specifies the existing operating-system user and database role used for ownership and migration. Defaults to
taler-merchant-httpd.
24.102.4. Exit Status#
0The database was configured successfully.
1An argument, prerequisite, permission, or database operation caused setup to fail.
The script may also propagate another non-zero status from a utility it invokes, such as taler-merchant-config.
24.102.5. See Also#
taler-merchant-dbinit(1), taler-merchant.conf(5).
24.102.6. Bugs#
Report bugs by using https://bugs.taler.net or by sending electronic mail to <taler@gnu.org>.