mylvmbackup and mysqld_multi

Bug #1618169 reported by Terrac Skiens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mylvmbackup
Incomplete
Undecided
Lenz Grimmer

Bug Description

MyLvmBackup seems to be picking up ALL instances in a mysql_multi configuration

For example (porposely truncated config file)
Here's a my.cnf from mysql_multi configuration
(running multiple mysql instances on same host, one config file)

[mysqld1]
# GENERAL #
user = mysql
default_storage_engine = InnoDB
socket = /var/run/mysqld/mysqld.sock
pid_file = /var/run/mysqld/mysqld.pid
port = 3306
bind_address = 0.0.0.0
# DATA STORAGE #
datadir = /var/lib/mysql

[mysqld1]
# GENERAL #
user = mysql
default_storage_engine = InnoDB
socket = /var/run/mysqld/mysqld-3305.sock
pid_file = /var/run/mysqld/mysqld-3305.pid
port = 3305
bind_address = 0.0.0.0
# DATA STORAGE #
datadir = /var/lib/mysql-restore-db

However, when I run mylvmbackup, it returns an error (although still doing the required steps to produce a backup)

mylvmbackup --configfile=/etc/mylvmbackup.conf
ERROR: datadir: /var/lib/mysql
 /opt/backup/mysql-restore-db/ is not a directory
  Logical volume "data_snapshot" created.
160829 18:18:11 mysqld_safe Logging to '/tmp/mylvmbackup_recoverserver.err'.
160829 18:18:11 mysqld_safe Starting mysqld daemon with databases from /var/tmp/mylvmbackup/mnt/backup/mysqld_safe mysqld from pid file /var/tmp/mylvmbackup_recoverserver.pid ended
backup/
backup/mysql/
backup/mysql/help_category.frm
backup/mysql/help_category.MYI
backup/mysql/help_category.MYD

I am curious how to properly setup mylvmbackup in combination with mysql_multi - or if this is actually a bug.

Revision history for this message
Lenz Grimmer (lenzgr) wrote :

Thanks for the report. To be frank, I don't think that anybody has tested mylvmbackup in combination with a configuration file that defines multiple MySQL instances, as the code has no way to tell which of the configured MySQL instances is the one that's currently supposed to be suspended and backed up.

I assume the code that calls mysqld_safe to perform the InnoDB recovery is the culprit, but I'm afraid I don't have a way to reproduce or investigate this problem at the moment. Could you please post your mylvmbackup.conf file as well, so we can check the configuration?

Thanks!

Changed in mylvmbackup:
assignee: nobody → Lenz Grimmer (lenzgr)
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.