DatAdmin has command line interface called DACI. It is used internally when running scheduled jobs, also it can be used by user to do various database tasks (export, backup, copy, syncrhonize database, running saved jobs, generating SQL from databse objects, running SQL against databse)
DACI has inbuilt help command reflecting actual commands and its parameters.
While help, which you now read, tries to be a bit informal and ilustrative,
DACI help command writes exact information, which is really used.
Run "daci" without parameters to list commands, "daci help <command>" to get help about one command.
Connection is specified using these parameters:
Export databse into DBK or DDF file (data archive or database structure). Accepts parameter outfile.
daci exportdb --dbfile database.db3 --outfile backup.dbk - opens database file database.db3
(must be in SQLite format) and dumps it as data archive to file backup.dbkdaci exportdb --dbfile data:mysql-local.con --database test1 --outfile backup.ddf - assumes defined connection
mysql-local, dumps structure of database test1 to file backup.ddfGenerates SQL from any database object. Accept connection parameters, template specification (what should be dumped) and object name. If not specified outfile parameter, SQL is dumped to standard output.
daci gensql --dbfile data:database.db3 --template create-all --dialect sqlite > test.sql
- dumps creation of all database objects (tables, views, indexes...) into file test.sqldaci gensql --driver mysql --connection "Data Source=localhost;User ID=root;Password=PASSWORD" --database DBNAME --objname TABLENAME --template recreate-table --dialect mysql > test.sql
- dumps recreation of table TABLENAME. Also shows how direct connection using connection string is done.Copies database from one place to other. Source connection parameters are prefixed with "src.", destination with "dst,". Structure and data are copied. Each database can have different database engine.
daci copydb --src.driver mysql --src.connection "Data Source=localhost;User ID=root;Password=PASSWORD" --src.database SRCDB --dst.dbfile OUTPUT.db3
- copies database SRCDB from mysql server at localhost into SQLite database into file OUTPUT.db3daci copydb --src.dbfile: INFILE.dbk --dst.dbfile OUTFILE.db3 - creates SQLite database OUTFILE.db3 from data archive stored in file INFILE.dbk