Joe,

The way I'm working it, I have a simple ruby wrapper function for
drush, it's at the bottom of the file, but here it is:

def drush(command)
  run "cd #{latest_release}/public && #{drush_cmd} #{command}"
end

Where #{drush_cmd} is set to point to my drush installation,
/opt/drush/drush  Drush reads all the info it needs by reading from
settings.php

That lets me simplify my code, to simply be:

drush "sql dump > #{file_path}"

You could theoretically use that same file_path variable in your
download command.

I think I might be sidestepping the question though, you need to make
sure drush is installed on both servers, preferably in the same place.

-Tim

We can only see a short distance ahead, but we can see plenty there
that needs to be done.  --Alan Turing, 1950



On Tue, Mar 23, 2010 at 3:09 PM, joe <[email protected]> wrote:
>> * Create a task, using your example, call it :backup_db.  In it, use
>> drush sql dump on the remote host to generate a sql dump of your db,
>> than use download to pull that file.
>
> I see in your common.rb file you have a task that does some drush
> stuff.  Where is this being executed?  Are you pointing to an
> installation of drush on a remote server?  All I see if a path.  Does
> capistrano just "know" where to do it or am I missing something?  In
> my case, I'd need to run drush commands on both dev and staging (if I
> wanted to dump and import the db).
>
> --
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to 
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en
>
> To unsubscribe from this group, send email to 
> capistrano+unsubscribegooglegroups.com or reply to this email with the words 
> "REMOVE ME" as the subject.
>

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

To unsubscribe from this group, send email to 
capistrano+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to