MySQLDumper instead of phpMyAdmin?

Discussion in 'Feature Requests' started by schmidtedv, Jul 7, 2006.

  1. schmidtedv

    schmidtedv New Member

    Would this be possible to use, maybe only as admin, www.mysqldumper.de in ISPConfig? Makes safer backups and loads them back without getting timeout. My only problem to get it in was that if I put it in home-directory, it will connect with the ISPConfig-PHP 5.1.4 and there, for instance, is no zlib aktivated...so maybe is there a way to tell it to connect to the other php or can I somehow install zlib etc. in ISPConfig-PHP?
     
  2. sjau

    sjau Local Meanie Moderator

    how about using a shell script directly and the mysqldump command?
     
  3. schmidtedv

    schmidtedv New Member

    not quite shure how you mean this :) ...I would like to use mysqldumper because its really nice and easy to handle...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to run sqldumper on your normal PHP and webserver, just create a new website like database.yourdomain.com and install mysqldumper inside this website.

    Personally I prefer a shell script like sjau recommended it, here is a small example:

    Code:
    #!/bin/sh
    
    # Create the temporary copy directory
    mkdir /var/mysql_backup/
    
    # Get the list of MySQL Databases & copy them
    for var in `find /var/lib/mysql/ -type d | \
    sed -e "s/\/var\/lib\/mysql\///"`; do
    mysqlhotcopy -q "$var" /tmp/mysql
    done
    
    # Tar/gzip data
    
    date=`date -I`
    tar czf /var/mysql_backup/mysql-$date.tar.gz -C /tmp/ mysql/
    
    # Copy Data
    mv  /var/mysql_backup/mysql-$date.tar.gz /home/db_backup/mysql-$date.tar.gz
    
    # Delete temp files
    
    rm -fR /var/mysql_backup/
    
    For security reasons I recommend not to use the /tmp directory to store the mysql dumps temporaily. Make sure you have a directory /home/db_backup.
     

Share This Page