-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add database piping tool #235
Comments
Maybe, perhaps tying into the export functionality on the dashboard |
This has gotten a lot of +1's from the Power Users list. |
What we probably need is something like:
You could then pipe that to a local file:
Or even directly to your locally running instance of mysql:
|
@joshkoenig I think we should have a discussion about to what extent terminus is a wrapper around the Platform (mostly REST) API, and to what extent Terminus is implementing new behaviors and plugging into local-machine resources (git, mysql). We have another issue asking for SQL connection info (#184) that I think would be a better starting place. Or, to address this issue, building fine-grained backups into the platform. |
Just my +1 for either (OR BOTH)
|
+1 for me. This would be great enhancement! Hope to see this feature added |
+1 pls pantheon pls. |
+1 for this. Pantheon really needs a quick and easy way to pull down a copy of the database. None of the available options are really as slick as they could be:
|
For WordPress, this should be available via WP-CLI since you can export the DB to stdout. However, it seems
This error message doesn't exactly make sense either 😄 |
Plus 1 for allowing db wp-cli commands on terminus. |
Any updates on this? would love to be able to use the WP_CLI db commands, if not all at least some. |
I have a plugin I made to do this for Drupal Sites: https://github.com/derimagia/terminus-pipe - my goal was/is to make it as fast as possible. Sadly I haven't had too much time so I haven't "released" the plugin - right now it only supports Drupal (needs drupal aliases.. although it should work/be able to be configured to work with wordpress sites if an alias is set up...). Secondly it only works on Mac/Linux right now. I eventually want to have it do the same thing with files once I have more time to work on it. |
Previously it was suggested that you could simply pipe to a local file:
However, that now doesn't appear to work (if it ever did):
|
@philipjohn just to quickly unblock you, I think the pipe character in that script is executed on the remote rather than piping the output from the command to a local file. I think you want something like this to execute the command, and then pipe the output locally (sorry, my bash is terrible):
|
Thanks @bensheldon ! You put me on the right track, here's what worked:
That |
Right now we can download databases via the 'terminus site backup get' command and we can create the latest via 'terminus site backup create.'
The problem with this method is twofold
1.) Even when specifying just the database element, it creates backups for the database, code, and files (and waits until all are complete before succeeding).
2.) This also adds a backup to the backup queue in the pantheon dashboard which can clutter up the queue.
Maybe a command similar to sql-sync-pipe which pipes the database directly into a local database?
The text was updated successfully, but these errors were encountered: