Bug #39614 Not able to perform concurrent backup/restore operations
Submitted: 23 Sep 2008 18:52 Modified: 5 Oct 2010 7:51
Reporter: Hema Sridharan Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:mysql-6.0-backup OS:Linux
Assigned to: Rafal Somla CPU Architecture:Any

[23 Sep 2008 18:52] Hema Sridharan
Description:
1) Create database, tables and insert some values in the tables.
2) Perform backup database operations from 2 different connections from same server. The following error message is noticed:
ERROR 1627 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress 

Ideally this should not be the case, User should be able to perform Backup Database operation while Restore operation is going on from other connection and viceversa.

With the current Mysql Backup feature, user is not allowed to perform concurrent Backup and Restore operations.Also concurrent Backup to different locations should be possible.

How to repeat:
Note: I used 33MB database(takes close to 1min to complete restore). It is not required to have huge database(in GB's) as I was able to repeatedly reproduce the issue with just 33MB database. The timings of commands that I issued were very quick and in seconds as mentioned below 

connection con1: Local time 5:41:28
===============
mysql> restore from '/export/home/tmp/backup_file/dbb.bak';

Immediately perform another restore from connection 2
connection con2: Local time 5:41:37
===============

mysql> restore from '/export/home/tmp/backup_file/dbb.bak';
ERROR 1627 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress

Restore of different database from backup image tt.bak
mysql> restore from '/export/home/tmp/backup_dmp/tt.bak';
ERROR 1627 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress

connection con1:
================

mysql> restore from '/export/home/tmp/backup_file/dbb.bak';
+-----------+
| backup_id |
+-----------+
| 263       |
+-----------+
1 row in set (1min 3.75sec)

The same thing happens for backup database also:

connection con1:
================

mysql> backup database dbb to '/export/home/tmp/backup_dmp/dbn.bak';

connection con2:
================
mysql> backup database dbb to '/export/home/tmp/backup_dmp/dbt.bak';
ERROR 1627 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress

connection con1:
mysql> backup database dbb to '/export/home/tmp/backup_dmp/dbn.bak';
+-----------+
| backup_id |
+-----------+
| 267       |
+-----------+
1 row in set (12.98 sec)
[24 Sep 2009 16:29] Rafal Somla
Note that the described behaviour is intentional. MySQL backup system was written with (initial) assumption that in a server instance only a single BACKUP/RESTORE operation can run at a time. Being able to run several concurrent operations is a new requirement. I think it should be first decided if and when we want to implement it.
[5 Oct 2010 7:51] Ingo Strüwing
The feature will not be implemented.