Create pipe. Create databases and some data. CREATE DATABASE db1; CREATE DATABASE db2; USE db1; CREATE TABLE t1(id int); INSERT INTO t1 VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; USE db2; CREATE TABLE t2(a char(5)); INSERT INTO t2 VALUES('a'),('b'),('c'),('d'),('e'),('f'),('g'),('h'); INSERT INTO t2 SELECT * FROM t2; INSERT INTO t2 SELECT * FROM t2; INSERT INTO t2 SELECT * FROM t2; Start backup to pipe. BACKUP DATABASE db1 TO 'db1_pipe'; Attempt to run a backup while another is in progress. BACKUP DATABASE db2 TO 'db1_pipe'; ERROR HY000: Can't execute this command because another BACKUP/RESTORE operation is in progress Cat the output to a file. backup_id # Start another backup to the same pipe. BACKUP DATABASE db2 TO 'db1_pipe'; Cat the output to a file. backup_id # Cleanup DROP DATABASE db1; DROP DATABASE db2;