Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Remote MySQL backup and download



On Fri, Mar 13, 2009 at 6:31 PM, Dave M G <dave@example.com> wrote:
> So... do I use SSH or something else to log in and then start a MySQL session? I don't quite understand how I would be executing commands from my batch shell in another, secondary, SSH command shell...

If you add a command to the arguments for ssh they run on the remote
machine and the output is piped back locally.

Just try it. Start out with something simple.
ssh user@example.com ls -l

If you want to use a pipe in your command, use quotes otherwise your
local shell will setup a local pipe
ssh user@example.com "mysqldump dname | bzip2" >`date -I`.db.dump.bz2

The above compresses the data before ssh sends it back to you. You
might want this.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links