Simple script for automatic MySQL database import from rshop dumps.
brew tap riesenia/utils
brew install import-dbAfter installation, ~/.import-db.conf is automatically created.
import-db [OPTIONS] <database> <url>
Arguments:
database Target MySQL database name
url Path URL to the first (ending 1.sql) file
Options:
-u <user:password> Basic authentication credentials
-h Show help messageRun the script with the database name and URL to the first file (name ending 1.sql):
import-db mydb https://example.com/export/db-x.1.sqlThe script will automatically run post-import queries after the import (if configured).
You can define post-import queries in ~/.import-db.conf using POST_IMPORT_QUERIES. These will be automatically executed after the database import completes.