Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My OS is Ubuntu 10.10. I have several small sites (all on various shared hosts) and I'm thinking that it'd be probably good idea to regularly backup mysql databases from these remote shared hosts. I currently do it manually and it seem to be while not laborious but definitely boring process (phpmyadmin).

How should I go about it (no ssh access available)?

If do it like this:

mysqldump -u root -p[root_password] [database_name] -h mysql_host > dumpfilename.sql

Does that mean that password is being transferred in plain text?

share|improve this question
If you are executing mysqldump with -p option from a commandline, then you are making the password visible in the process commandline, which can be viewed by anyone executing the ps command. – Nikhil Mulley Nov 30 '11 at 19:01
up vote 3 down vote accepted

Specifying the password that way is just insecure on your machine. Over the network it's just the same way that MySQL clients connect to your database. As far as I read, the username and password are hashed, so you are not sending your password in plain text.

In your situation I would write a simple wrapper script, something like

for host in host1 host2 host3
    do mysqldump ...
share|improve this answer

Check out


Also consider the incremental backups


Check out maatkit, which automates most of the stuff.

share|improve this answer
I would suggest make the mysql backups locally on that machine and periodically sync them to the internal or main site for compressed backups. Just make sure the dumps are stored in a relatively secured directory with restrictive permissions. It would make things easy as well when you are about to restore the databases on a remote site when needed. – Nikhil Mulley Nov 30 '11 at 19:04

backup-manager is the most complete and powerful in my opinion.

share|improve this answer
What others have you considered? Why do you think this is the best? OPs parameters might be quite different than yours... – vonbrand Mar 21 '13 at 20:59
It can compress file, automatic and scheduled backup, deleting old saves, splitting backups into smaller part. It ave also incremental feature, launch command before/after backup, FTP/SVN/... sync, burning on CD/DVD, multiple SQL database dump, etc. And all configurations is simple (one file) and well documented.You just pick what feature you want to use. – GHugo Mar 21 '13 at 21:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.