Hello everybody,
Am I wrong in assuming that "drupal sql load" can be used to take a dumpfile produced by "drupal sql dump" and load it into another drupal root? The help documentation seems to imply that this command is only able to copy databases between subsites of the same drupal root.
I have a dump file from my local development environment and I want to move it to the remote server and load the drupal site there. I'm trying to incorporate drush into my shell scripts that I previously used for this.
Any help would be greatly appreciated, thanks.
Comments
Comment #1
greg.1.anderson commentedTake a look at
drush sql sync, available in drush-HEAD. It can push databases between remote machines. (n.b.drush sql loadhas been removed from drush-HEAD, so I would not recommend using it at this point.)You can also use sql sync to import from a previous dump by using the appropriate options (specify the path to the dump file and tell sql sync to not do the dump). However, you can also do an import via:
`drush sql connect` < dumpfile.sqlAlways experiment on scratch sites first!
Comment #2
eggplantpasta commentedThanks very much. Exactly what I was after.
PS. This is my first post to the site. Was this the correct place to ask this question? Do I now set the status to fixed?
Comment #3
greg.1.anderson commentedI think I was supposed to set the status to 'fixed' when I answered your question.
(I'm not a maintainer here, I just hang out, submit sql and site alias patches, and answer the occasional question or two...)