help me ! Lost my database...

Discussion in 'General' started by bima0815, Nov 26, 2007.

  1. bima0815

    bima0815 New Member

    I'm using ISPconfig (With Fedora core 4 Linux) for my Web Control panel. I've problem with my staff.
    he is make disabled mysql featured and empty trash on tools panel.

    So .. my database with name web**_db1 was gone.....
    I'm using System recovery for Linux.. but cannot find that's file :((.

    How can i recover my database ?? .. please help me....

    Thanks for all.
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    What do you mean by system recovery for linux?

    How do you generally do a Backup of all your mysql Databases?
  3. bima0815

    bima0815 New Member

    I mean data recovery software, like disk doctors.

    Realy .. i have not backup for this .... I know that's stup*d :p

    Can i get data it again ??
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The mysql database files are stored in /var/lib/mysql/web**_db1 The files inside the folder are named like that tables that were in the database. Example for a table named "test":


    if you used MyISAM databases.
  5. bima0815

    bima0815 New Member

    Yups I know that.. Thanks for Information.

    But for mya question is.

    If i'd remove database from Ispconfig, and my database was gone.

    can i recover that with Linux data recovery software ??

  6. falko

    falko Super Moderator ISPConfig Developer

    If you've deleted your database and don't have a backup, then it's gone.
  7. Hans

    Hans Moderator ISPConfig Developer

    Tip for you.

    Yes that's a fact.
    Maybe it is a good idea to make backup automaticly of all your MySQL databases by using 'Zmanda Recovery Manager for MySQL' for example.
    Then you always have a backup of your databases!
    Last edited: Nov 28, 2007
  8. candy1111

    candy1111 New Member

    I am always using EASEUS Data Recovery Wizard to help me get my important files back.:cool:

  9. Ben

    Ben ISPConfig Developer ISPConfig Developer

    I am using this simple shellscript, attaching a timestamp to each db backup file and deletes files older than a given age in minutes, so you may call that script as often as you wish.

    #! /bin/sh
    BDIR=/root/mysql_backup   #backupdir
    TIME_PREF=`date +%Y%m%d-%H%M`  #format of the generated timestamp
    AGE=720  #in minutes
    #Delete files older than agedays
     LIST=`find $BDIR/* -cmin +$AGE`
     for i in $LIST
       echo "Removing $i"
       rm $i -f
    # Backup all Databases
     for i in `echo SHOW DATABASES | mysql -N --user=$DB_USR --password=$DB_PWD`; do
            echo Dump $i database to $BDIR/$TIME_PREF.$i.sql.gz
            mysqldump -u $DB_USR --password=$DB_PWD --databases $i --opt > $BDIR/$TI                                                                              ME_PREF.$i.sql
            gzip -f $BDIR/$TIME_PREF.$i.sql

Share This Page