Inist-CNRS / pkgi

Pkgi permet la création d'environnements applicatifs indépendants et mutualisés sous Debian.
http://www.pkgi.net
5 stars 3 forks source link

pkgi-mysqlbackup dumps only performance_schema database #6

Closed parmentf closed 11 years ago

parmentf commented 11 years ago

I don't why, but my databases are not only information_schema and mysql, but there is also a performance_schema, in addition to the database dedicated to the application:

mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | app | +--------------------+

So, when you use bin/pkgi-mysqlbackup, there is more than one database to dump (and perhaps separated by a carriage return), and only the first one is dump (in my case, it is empty, giving a 424 bytes-length gzipped file).

I tried this in mysql/bin/pkgi-mysqltools:

    APP_BASES=`echo "SHOW DATABASES;" | $APP_HOME/usr/bin/mysql \
            | grep -v "^Database$" \
            | grep -v "^information_schema$" \
            | grep -v "^performance_schema$" \
            | grep -v "^mysql$"`

And it worked.

I still have to learn how to do a pull request ;)

kerphi commented 11 years ago

Nice work ! So, please submit a pull request :-)