HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/sbin/mysqldumpbackup
#!/bin/sh

# IDF (iforbes@zsd.co.za) 10 Oct 2004
# dump mysql databases to facilitate backup
# IDF (iforbes@zsd.co.za) 29 Mar 2010
# only dump directories not other files in ~mysql dir
# cuts down on errors and noise
# IDF: Updated 2015-03-04
# IDF: Updated 2015-05-29

# Note requires .my.cnf file in /root directory with mysql username and password.

# Exit quitely if mysql is not installed
test  -x /usr/bin/mysqldump || exit 0

echo doing backup

MYSQLDIR="/var/lib/mysql"

# create backup directory if required
if [ ! -d /var/backups/mysql ]; then
  mkdir -p /var/backups/mysql
fi

ls -1 -d $MYSQLDIR/* |

while read DATABASEDIR
do
  #! echo $DATABASEDIR
  if test -d $DATABASEDIR
    then
      DATABASE=`basename $DATABASEDIR`
      echo `date` doing $DATABASE
      #mysqldump $DATABASE | gzip > /var/backups/mysql/${DATABASE}.gz
      mysqldump $DATABASE > /var/backups/mysql/${DATABASE}
  fi
done