Managing amaGama

Note

Please make sure that the amagama-manage command is accessible in order to be able to use it.

amaGama is managed through the amagama-manage command. Try running it with no arguments for usage help:

$ amagama-manage

The amagama-manage command exposes several management subcommands, each having it’s own --help option that displays its usage information:

$ amagama-manage SUBCOMMAND --help

See below for the available subcommands.

Available subcommands

These are the available management subcommands for amaGama:

benchmark_tmdb

This subcommand benchmarks the application by querying for all strings in the given file.

Note

For more information please check the help of this subcommand.

build_tmdb

This subcommand is used to import translations into amaGama from bilingual translation files. Please refer to the importing translations section for a complete usage example.

deploy_db

This subcommand is used to optimize the database for deployment. It has no options:

$ amagama-manage deploy_db
This will permanently alter the database. Continue? [n] y
Succesfully altered the database for deployment.

dropdb

This subcommand is used to drop the tables for one or more source languages from the amaGama database:

$ amagama-manage dropdb -s fr -s de
This will permanently destroy all data in the configured database. Continue? [n] y
Succesfully dropped the database for 'fr', 'de'.

initdb

This subcommand is used to create the tables in the database for one or several source languages. It can be run several times to specify additional source languages. The following example creates the tables for english and french:

$ amagama-manage initdb -s en -s fr
Succesfully initialized the database for 'en', 'fr'.

tmdb_stats

This subcommand is used to print out some figures about the amaGama database. It has no options:

$ amagama-manage tmdb_stats
Complete database (amagama):        400 MB
Complete size of sources_en:        234 MB
Complete size of targets_en:        160 MB
sources_en (table only):    85 MB
targets_en (table only):    66 MB
sources_en  sources_en_text_idx     83 MB
targets_en  targets_en_unique_idx   79 MB
sources_en  sources_en_text_unique_idx      53 MB
targets_en  targets_en_pkey 16 MB
sources_en  sources_en_pkey 13 MB