Hello gurus,
It's now the season for pumpkin everything; latte flavors, pumpkin beer, pumpkin spice tacos. It's also the time for getting all my Drupal sites connected via drush thanks to some hosting adjustments (way better than pumpkin!).

While I'm at it, do you know if it's possible and not totally stupid to use drush when backing up other non-Drupal websites? I know I can pull the files quickly with drush aliases/rsync, but I'm not sure about the database dumps/downloads. I guess I could use other commands via ssh. If using drush, I may need to add a sites/default/settings.php to make it happen? Maybe I could add something to the aliases file?

I look forward to thoughts. For now, I'm just happy to have improved drush goodness and pumpkin shaped Reese's peanut butter cups. :D

Best regards,

Chris

Comments

owntheweb’s picture

I figured it out. It works! Here's a quick example to dump and download a remote website database for a non-Drupal website using drush:

drush @mynondrupalwebsite.org sql-dump --db-url="mysql://username:password@localhost/databsename" > ~/mynondrupalwebsite.org-$(date +\%Y-\%M-\%d-\%H-\%M-\%S).sql

Or, you could set your alias to look something like this for additional simplicity:

$aliases['mynondrupalwebsite.org'] = array(
    'root' => '/home/mynondrupalwebsite/public_html/',
    'remote-host' => 'mynondrupalwebsite.org',
    'remote-user' => 'mynondrupalwebsite',
    'ssh-options' => '-p 22',
    'db-url' => 'mysql://username:password@localhost/databsename',
);

and then:

drush @mynondrupalwebsite.org sql-dump > ~/mynondrupalwebsite.org-$(date +\%Y-\%M-\%d-\%H-\%M-\%S).sql

Fun stuff.

Worlds to explore. Worlds to create.
Blog: http://www.christopherstevens.cc/blog
Twitter: http://www.twitter.com/owntheweb