chronicle
CLI to get infomations of tables and databases on MySQL
How to build
$ go get
$ go build
Usage
Effective CLI for dump/restore/validate to MySQL and PostgreSQL
Usage:
chronicle [flags]
chronicle [command]
Available Commands:
dump Store dump files of all databases and tables
help Help about any command
recreate Recreate all databases and tables with dumped files and informations.
validate Validate all restored tables and databases.
version Print version
Flags:
--bucket string Bucket which store dump and information files (required only if store at not local)
--dbms string Type of the database management system (choice "mysql", "postgres")) (default "mysql")
--dir string Directory which store dump and information files (required)
-h, --help help for chronicle
-H, --host string Hostname of database (default "127.0.0.1")
-p, --pass string Password of database
-P, --port int Port of database (default 3306)
--retry int Maximum number of tries (default 5)
--storage string Type of storage which store dump and information files (choice "s3", "local") (default "local")
--thread int Maximum number of threads (default 10)
-u, --user string Username of database (default "root")
Use "chronicle [command] --help" for more information about a command.
Store dump files of all databases and tables
Usage:
chronicle dump [flags]
Flags:
-h, --help help for dump
--only-info Create only information file
--skip-info Skip creating information file
Global Flags:
--bucket string Bucket which store dump and information files (required only if store at not local)
--dbms string Type of the database management system (choice "mysql", "postgres")) (default "mysql")
--dir string Directory which store dump and information files (required)
-H, --host string Hostname of database (default "127.0.0.1")
-p, --pass string Password of database
-P, --port int Port of database (default 3306)
--retry int Maximum number of tries (default 5)
--storage string Type of storage which store dump and information files (choice "s3", "local") (default "local")
--thread int Maximum number of threads (default 10)
-u, --user string Username of database (default "root")
Recreate all databases and tables with dumped files and informations.
Usage:
chronicle recreate [flags]
Flags:
-h, --help help for recreate
Global Flags:
--bucket string Bucket which store dump and information files (required only if store at not local)
--dbms string Type of the database management system (choice "mysql", "postgres")) (default "mysql")
--dir string Directory which store dump and information files (required)
-H, --host string Hostname of database (default "127.0.0.1")
-p, --pass string Password of database
-P, --port int Port of database (default 3306)
--retry int Maximum number of tries (default 5)
--storage string Type of storage which store dump and information files (choice "s3", "local") (default "local")
--thread int Maximum number of threads (default 10)
-u, --user string Username of database (default "root")
Validate all restored tables and databases.
Usage:
chronicle validate [flags]
Flags:
-h, --help help for validate
Global Flags:
--bucket string Bucket which store dump and information files (required only if store at not local)
--dbms string Type of the database management system (choice "mysql", "postgres")) (default "mysql")
--dir string Directory which store dump and information files (required)
-H, --host string Hostname of database (default "127.0.0.1")
-p, --pass string Password of database
-P, --port int Port of database (default 3306)
--retry int Maximum number of tries (default 5)
--storage string Type of storage which store dump and information files (choice "s3", "local") (default "local")
--thread int Maximum number of threads (default 10)
-u, --user string Username of database (default "root")
Dependency
Linux
- sed
- mysql-client
- psql
- pg_dump
macOS
- sed
- mysql-client
- psql
- pg_dump