Error occured when backuping

Infos:

  • Used Zammad version: 3.3
  • Used Zammad installation source: (source, package, …) package
  • Operating system: centos7
  • Browser + version: chrome

Expected behavior:

  • Backup zammad works fine

Actual behavior:

  • I am trying to backup zammad , but an error occure:

    [root@zammad backup]# ./zammad_backup.sh

    Zammad backup started - mar. juil. 14 12:24:20 CET 2020!

    creating file backup…
    creating mysql backup…
    mysqldump: Got error: 2002: “Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)” when trying to connect

    Zammad backuped successfully - mar. juil. 14 12:24:41 CET 2020!

the file /var/lib/mysql/mysql.sock exist on my mysql server and has the ownership : mysql mysql

PS:

  • I am using a mysql database on another server (external database)

  • I have tested conection from my zammad instance to the mysql database :

     mysql -h  ipadresse  -P 3306  -u userh -p
     Enter password:
     Welcome to the MariaDB monitor.  Commands end with ; or \g.
     Your MariaDB connection id is ...........
    

Steps to reproduce the behavior:

$ vim /opt/zammad/contrib/backup/config

BACKUP_DIR=’/root/backup/z_backup’

HOLD_DAYS=‘5’

DEBUG='no

$ cd /opt/zammad/contrib/backup
$ ./zammad_backup.sh

That’s the mysql based relevant line:

So in short, this should be fixable with adjusting your mysql client configuration to tell it it doesn’t want to connect to the local socket by default. If that’s no option, copy the backup directory and adjust backup script.

This backup script expects the installation to be local.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.