Bug #21309 simple way to quiesce the data files for backup
Submitted: 27 Jul 2006 5:55 Modified: 2 Aug 2006 1:48
Reporter: Dave Yost Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:5.0.22 OS:Any (whatever)
Assigned to: CPU Architecture:Any
Tags: Backup, integrity
Triage: Triaged: D5 (Feature request)

[27 Jul 2006 5:55] Dave Yost
Description:
Backing up should be simple.
The instructions on this page are way, way too complicated.

How to repeat:
Try to read the documentation on backup!

Suggested fix:
There should be something simple like this:

cd mysql
support-files/mysql.server pause
rsync -ar data/ /tmp/mysqlbackup
support-files/mysql.server start

Such a pause command would flush out consistent data to all of the files, then return, and it wouldn't require a password to be stored in the script that invokes it.  The start command should be expanded to either start the server from scratch as it does now or if the server is paused, to resume it.  (There shouldn't be a separate resume command.)
[27 Jul 2006 5:57] Dave Yost
Documentation on backup: 
http://dev.mysql.com/doc/refman/5.0/en/backup.html
[27 Jul 2006 9:43] Valeriy Kravchuk
Thank you for a reasonable feature request.
[27 Jul 2006 15:47] Jim Winstead
You might be interested in reading the functional specification for how backup will work in some future version:

http://forge.mysql.com/w/images/1/11/MySQL_Online_Backup_Functional_Specification.pdf

Or the more technical description:

http://forge.mysql.com/wiki/OnlineBackup

You can provide feedback to rschumacher@mysql.com.

(Note that a 'pause' command that did not require authentication would not happen -- that would be a rather large vector for denial-of-service attacks.)
[27 Jul 2006 21:13] Dave Yost
How would a pause command be any more of a security problem than the existing stop command?
[27 Jul 2006 21:20] Dave Yost
I now realize that there should indeed be a resume command.  If the server is paused, the command would resume normal operations; otherwise, the resume command would have no effect.

See http://bugs.mysql.com/21323
[27 Jul 2006 21:35] Jim Winstead
It's "wouldn't require a password" that creates the security problem.
[2 Aug 2006 1:48] Dave Yost
By "wouldn't require a password" I mean not requiring a database password on the command line.  The userid executing the command would of course have to be privileged, and access to that userid requires a system password. The command
  % nysql/support-files/mysql.server stop
doesn't require a command-line database password, and similarly neither should
  % nysql/support-files/mysql.server pause
  % nysql/support-files/mysql.server resume
[30 Sep 2009 13:41] Rafal Somla
From the bug description it seems that it is about the mysqldump utility, not about the built-in MySQL Backup system.