How to restore backup file

  • Aalishan

    Aalishan - 2006-10-25

    hi , I am trying to restore my .sql  GZ file on ipowerweb server but it does not work ..can you tell me how to retore file on host server please.

    • Harley

      Harley - 2006-10-25


      There is a section on restoring in the script instructions..

      Here it is..
      # Restoring
      # Firstly you will need to uncompress the backup file.
      # eg.
      # gunzip file.gz (or bunzip2 file.bz2)
      # Next you will need to use the mysql client to restore the DB from the
      # sql file.
      # eg.
      # mysql --user=username --pass=password --host=dbserver database < /path/file.sql
      # or
      # mysql --user=username --pass=password --host=dbserver -e "source /path/file.sql" database
      # NOTE: Make sure you use "<" and not ">" in the above command because
      # you are piping the file.sql to mysql and not the other way around.

      Hope that helps..

    • Aalishan

      Aalishan - 2006-10-25

      Thanks I will try this.

    • boodle

      boodle - 2006-11-03

      You can also use a program called "phpmyadmin" ( which is often times install by server admins already.

      You can paste the .sql file into the "SQL" box and hit go.

      I find phpmyadmin easier to use than command line. IMHO

      P.S. entries in the sql file should look like this:
      "-- Table structure for table `address_book`
      DROP TABLE IF EXISTS `address_book`;
      CREATE TABLE `address_book` (


      When in doubt ask your isp or guru.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks