views:

145

answers:

1

I am trying to write a capistrano task that will backup databases on multiple servers. The bash script that backs up the databases is on my local machine. However capistrano outputs this error message:

`backup' is only run for servers matching {}, but no servers matched

I am new to capistrano, is there some kind of setting I can set so that I can just run local commands.

A: 

Without a little more information, it's difficult to say exactly what the problem might be. It sounds to me like you're trying to run a bash script that's on your local computer on several remote servers. This is not something that Capistrano can do. It will run commands on remote servers, but only if the commands are present on those servers. If your bash script is something that needs to be run from the database server, you'll need to upload the script to those servers before running with with Capistrano. If, on the other hand, you're trying to run a script that connects to those servers itself, there's no reason to involve Capistrano. Running commands over an ssh connection is what it's designed for. If you could post the your Capfile, including the tasks you are trying to run, we might be able to give you more specific assistance.

Emily
Thanks for your response. I ended up just using the bash script. I just wanted to try use capistrano because I am new to ruby but I guess this is not a good use case. Maybe next time.
jimiyash