This is turning into a thing, but should make pulling stats much more pleasant.
Query raw table statistics from the database. Supports gathering statistics from production
Required:
-s, --server SERVER The database server. Either 'mysql' or 'postgres'
-d, --directory APP_DIR The application directory on the server.
Options:
-h, --host HOST The host to execute the statistics query from. Defaults to localhost.
-e, --environment ENVIRONMENT The database environment. Defaults to 'production'.
Advanced options:
--script Print a customizable script instead of executing.
-f, --file FILE Converts the output file from a customized script to usable stats.
--client CLIENT The client command to run, defaults to 'rails dbconsole'. Can use 'mysql' and 'psql'.
SSH connection options:
-p, --proxy PROXY_HOST The proxy (jump server) to connect to first.
Common options:
--verbose Verbose/debug mode
--help Show this message
--version Show version
This is turning into a thing, but should make pulling stats much more pleasant.