A simple command-line tool for syncing development database.
npm install -g commute
OR
npm link -g (from within this repo locally)
Commute expects to find a YAML file at ~/.commute.yml
that defines the connection settings for each project.
sources:
staging:
host: 123.456.789.0
u: remoteuser
secure: true
mysql-local:
host: 127.0.0.1
db:
u: root
p: root
my-project:
remote:
source: staging
db:
name: remote-db-name
u: dbuser
p: dbpass
local:
source: mysql-local
db:
name: local-db-name
Run commute out of any project directory:
commute <project> <operation>
project
: The name of the project to work with, should match a top-level key in ~/.commute.yml
operation
: Should be one of down
, or dump
Creates a dump of the remote database and imports it into the local database.
Creates a dump of the remote database and saves it locally without importing.