Package: backupninja
Version: 1.0~rc1-1
Severity: normal
Tags: patch

Hello,
 Since mysql server version is 5.5 under Debian, the message "Warning: 
mysqldump: Couldn't execute 'show events': Access denied for user 
'backupninja'@'localhost' to database 'performance_schema' (1044)
 Warning: Failed to dump mysql databases performance_schema" is issued when 
backing up the performance_schema database. 
 As it appears that it is not possible to backup events from this virtual 
database, the attached patch adds the option '--skip-events' when backing up 
this database in order to correct this warning.
 Regards,


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages backupninja depends on:
ii  bash                    4.2-2
ii  bsd-mailx [mailx]       8.1.2-0.20111106cvs-1
ii  dialog                  1.1-20120215-1
ii  gawk                    1:4.0.1+dfsg-1
ii  heirloom-mailx [mailx]  12.5-2
ii  mawk                    1.3.3-17

backupninja recommends no packages.

Versions of packages backupninja suggests:
pn  bzip2          1.0.6-1
pn  debconf-utils  1.5.43
pn  duplicity      <none>
pn  genisoimage    <none>
pn  hwinfo         16.0-2.2
pn  mdadm          3.2.4-1
pn  rdiff-backup   1.2.8-7
pn  rsync          3.0.9-1
pn  subversion     1.6.17dfsg-3
pn  trickle        <none>
pn  wodim          <none>

-- Configuration Files:
/etc/backupninja.conf changed [not included]

-- no debconf information
Index: backupninja-1.0~rc1/handlers/mysql.in
===================================================================
--- backupninja-1.0~rc1.orig/handlers/mysql.in	2012-05-15 17:21:41.000000000 +0200
+++ backupninja-1.0~rc1/handlers/mysql.in	2012-05-19 20:59:02.417874223 +0200
@@ -256,10 +256,11 @@
    for db in $databases
    do
       DUMP_BASE="$MYSQLDUMP $defaultsfile $sqldumpoptions"
-      if [ "$db" = "information_schema" ] || [ "$db" = "performance_schema" ]
-      then
-         DUMP_BASE="${DUMP_BASE} --skip-lock-tables"
-      fi
+
+      case "$db" in
+        information_schema) DUMP_BASE="${DUMP_BASE} --skip-lock-tables" ;;
+        performance_schema) DUMP_BASE="${DUMP_BASE} --skip-lock-tables --skip-events" ;;
+      esac
 
       # Dumping structure and data
       DUMP="$DUMP_BASE $ignore $db"

Reply via email to