Menu

How to restore backup file

Aalishan
2006-10-25
2013-05-29
  • 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.
    Thanks

     
    • Harley

      Harley - 2006-10-25

      Hi,

      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" (http://www.phpmyadmin.net) 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` (

      "
      etc.

      When in doubt ask your isp or guru.

      boodle

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.