Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

In regards to:

Remounting MySQL under a new mount point

What would be the best way to backup MySQL data before moving the mount point? Can this be done with MySQL running? Would a simple rsync off to another server work?

share|improve this question
WOuld you like to change just the mount point or also switch to another server ? – golja Oct 25 '12 at 12:06
Just changing mount point. / is full – Tiffany Walker Oct 25 '12 at 12:07
then the instruction from the post you already mentioned in your question are fine. – golja Oct 25 '12 at 12:09
up vote 0 down vote accepted

You can also backup your mysql database directory using rsync just add -a option in your command to preserve owner & permission.

rsync -arvz source destination.

share|improve this answer
This may cause problems (including data corruption) if you do it while MySQL is running. – Ladadadada Oct 25 '12 at 12:38

Simple backup with MySQL downtime

  1. Stop MySQL - /etc/init.d/mysql stop
  2. Backup data directory - tar czf /var/backups/mysql-2012-10-25.tar.gz /var/lib/mysql

Backup using XtraBackup

Percona XtraBackup can be used to take online hot (non-blocking) backups of your database.

share|improve this answer
Anyway to do this without stopping mysql? This is a production system with close to 3GBs worth of MySQL database information. That could be a lot of downtime to tar. – Tiffany Walker Oct 25 '12 at 12:06
Yeah, I will edit the answer with an additional solution. – pkhamre Oct 25 '12 at 12:07
XtraBackup is non-locking on InnoDB tables but requires a read lock on all tables to do MyISAM. If you have a mix of the two, the lock will only be in place while the MyISAM tables are being backed up. – Ladadadada Oct 25 '12 at 12:41

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.