Backup Error

Discussion in 'General' started by Caio.Henrique, Sep 4, 2019.

  1. Caio.Henrique

    Caio.Henrique New Member

    I upgraded to git-stable, ran the backup command and the error still persists.

    Called run() for class cronjob_backup
    Job has schedule: 00 0 * * *
    Called onPrepare() for class cronjob_backup
    Called onBeforeRun() for class cronjob_backup
    Jobs next run is 2019-09-11 00:00:00
    Date compare of 1568170800 and 1568137745 is -1
    10.09.2019-14:49 - DEBUG - safe_exec cmd: tar pcf - --exclude=./backup\* --directory '/var/www/clients/client0/web22' . | pigz > '/var/backup/web22/web22_2019-09-10_14-49.tar.gz' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client0/web22' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client0/web22' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: tar pcf - --exclude=./backup\* --directory '/var/www/clients/client0/web7' . | pigz > '/var/backup/web7/web7_2019-09-10_14-49.tar.gz' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client0/web7' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client0/web7' - return code: 0
    tar: ./log/20190910-access.log: arquivo alterado enquanto estava sendo lido
    10.09.2019-14:49 - DEBUG - safe_exec cmd: tar pcf - --exclude=./backup\* --directory '/var/www/clients/client0/web14' . | pigz > '/var/backup/web14/web14_2019-09-10_14-49.tar.gz' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client0/web14' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client0/web14' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: tar pcf - --exclude=./backup\* --directory '/var/www/clients/client0/web6' . | pigz > '/var/backup/web6/web6_2019-09-10_14-49.tar.gz' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client0/web6' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client0/web6' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: tar pcf - --exclude=./backup\* --directory '/var/www/clients/client0/web3' . | pigz > '/var/backup/web3/web3_2019-09-10_14-49.tar.gz' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client0/web3' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client0/web3' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: tar pcf - --exclude=./backup\* --directory '/var/www/clients/client0/web4' . | pigz > '/var/backup/web4/web4_2019-09-10_14-49.tar.gz' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client0/web4' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client0/web4' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: tar pcf - --exclude=./backup\* --directory '/var/www/clients/client0/web5' . | pigz > '/var/backup/web5/web5_2019-09-10_14-49.tar.gz' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client0/web5' - return code: 0
    10.09.2019-14:49 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client0/web5' - return code: 0
    mysqldump: Couldn't execute 'SHOW PACKAGE STATUS WHERE Db = 'db_name'': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PACKAGE STATUS WHERE Db = 'db_name'' at line 1 (1064)
    10.09.2019-14:49 - DEBUG - safe_exec cmd: mysqldump -h 'localhost' -u 'user' -p'pass' -c --add-drop-table --create-options --quick --max_allowed_packet=512M --routines --result-file='/var/backup/web3/db_db_name_2019-09-10_14-49.sql' 'db_name' - return code: 2
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    No, the error does not persist. The backup ran perfectly fine regarding the "tar" commands. The Problem with your mysql dump is a different problem and most likely NOT related to ISPConfig.

    I guess that your mariadb client and server versions do not match. Please run
    Code:
    dpkg --list | grep 'mariadb'
     
  3. Caio.Henrique

    Caio.Henrique New Member

    ii libmariadb3:amd64 1:10.3.15-1 amd64 MariaDB database client library
    rc mariadb-client-10.1 10.1.38-0+deb9u1 amd64 MariaDB database client binaries
    ii mariadb-client-10.3 1:10.3.15-1 amd64 MariaDB database client binaries
    ii mariadb-client-core-10.3 1:10.3.15-1 amd64 MariaDB database core client binaries
    ii mariadb-common 1:10.3.15-1 all MariaDB common metapackage
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    So you are using mariadb client but mysql server? What about
    Code:
    dpkg --list | grep -i mysql
     
  5. Caio.Henrique

    Caio.Henrique New Member

    ii dbconfig-mysql 2.0.11 all dbconfig-common MySQL/MariaDB support
    ii default-mysql-client 1.0.5 all MySQL database client binaries (metapackage)
    ii libdbd-mysql-perl:amd64 4.050-2 amd64 Perl5 database interface to the MariaDB/MySQL database
    ii libmysqlclient18:amd64 5.5.62-0+deb8u1 amd64 MySQL database client library
    ii mysql 5.6.15 amd64 MySQL built using CMake
    ii mysql-client 5.5.9999+default amd64 MySQL database client binaries [transitional]
    ii mysql-common 5.8+1.0.5 all MySQL database common files, e.g. /etc/mysql/my.cnf
    rc mysql-server-5.5 5.5.55-0+deb8u1 amd64 MySQL database server binaries and system database setup
    ii php-mysql 2:7.3+69 all MySQL module for PHP [default]
    rc php5-mysql 5.6.30+dfsg-0+deb8u1 amd64 MySQL module for php5
    ii php5-mysqlnd 5.6.40+dfsg-0+deb8u5 amd64 MySQL module for php5 (Native Driver)
    ii php5-mysqlnd-ms 1.6.0-1+b1 amd64 MySQL replication and load balancing module for PHP
    ii php7.0-mysql 7.0.33-0+deb9u3 amd64 MySQL module for PHP
    ii php7.2-mysql 7.2.21-1+0~20190807.25+debian10~1.gbp935ebf amd64 MySQL module for PHP
    ii php7.3-mysql 7.3.4-2 amd64 MySQL module for PHP
    ii phpmyadmin 4:4.6.6-4 all MySQL web administration tool
    ii pure-ftpd-mysql 1.0.47-3 amd64 Secure and efficient FTP server with MySQL user authentication
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    That does not look anything close to a default debian setup. What have you done with your mysql/mariadb?
    Please make sure that your setup meets the prerequisites of ISPConfig.

    I guess that the commands
    Code:
    mysql --version
    mysqld --version
    mysqldump --version
    will show non-compatible versions. Unless you fixed that you won't get rid of the error.
     
  7. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    And in addition:
    Code:
    mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT VERSION()"
     
  8. Caio.Henrique

    Caio.Henrique New Member

    mysql Ver 15.1 Distrib 10.3.15-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
    mysqld Ver 5.6.15 for debian6.0 on x86_64 (MySQL Community Server (GPL))
    mysqldump Ver 10.17 Distrib 10.3.15-MariaDB, for debian-linux-gnu (x86_64)

    mysql --defaults-file=/etc/mysql/debian.cnf -e "SELECT VERSION()"
    +-----------+
    | VERSION() |
    +-----------+
    | 5.6.15 |
    +-----------+
     
  9. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    You now see what you messed up, don't you? How could mariadb 10.3 ever be compatible with MySQL 5.6?
    Please install the correct Mariadb server version. Normally it's done simply by apt-get install mariadb-server, but I have no idea why you have such an outdated mysql version installed and it might not be as easy as a simple update.
     
  10. Caio.Henrique

    Caio.Henrique New Member

    Ok, thank you
     
  11. Caio.Henrique

    Caio.Henrique New Member

    Hi everyone!
    I fixed the problem, i upgraded mysql 5.6 to mariadb 10.3.17 via apt-get install mariadb-server and mysql_upgrade. In this process i had to reconfigure the policies of mariadb.
    Thank you all for your help
     

Share This Page