Announcement

Collapse
No announcement yet.

Cannot backup database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot backup database

    Hi
    I need to do some uplift work for my website but need to bo able to backup and restore my database to other locations etc on a regular basis.

    I cannot use phpmyadmin to do this because it just returns a sql file as 0bytes.
    I belive this is a timeout of some description but cant find what to change within my Linux VPS to change this.

    I have tried using sqldump but even after that I dont know how I can use it without phpmyadmin.

    Is there a way to fix this timeout?
    Please help I am desperate now as I have a knew sponsor and need to upgrade the site.

  • #2
    You can backup your database using the following command:

    # mysqldump -u username -p database_name > filename.sql

    where:

    username = database user.

    database_name = the name of the database you want to backup.

    filename = name of the output file with sql extension.

    Alternatively, you can also try "Download a MySQL Database Backup" from cPanel of that account. It will download a file in .sql.gz format.

    Comment


    • #3
      Originally posted by littleme View Post
      Hi
      I need to do some uplift work for my website but need to bo able to backup and restore my database to other locations etc on a regular basis.

      I cannot use phpmyadmin to do this because it just returns a sql file as 0bytes.
      I belive this is a timeout of some description but cant find what to change within my Linux VPS to change this.

      I have tried using sqldump but even after that I dont know how I can use it without phpmyadmin.

      Is there a way to fix this timeout?
      Please help I am desperate now as I have a knew sponsor and need to upgrade the site.
      i would rather suggest you to go ahead with the PHP backup plans you are working with. For taking backup of your MySQL, it's very simple . you just have to login to you database get int o PHPMysql then you select the appropriate table at left hand side and then export the table and when ever needed you can use that stuff later by just importing the database for your website.

      Comment


      • #4
        Originally posted by Rachel View Post
        You can backup your database using the following command:

        # mysqldump -u username -p database_name > filename.sql

        where:

        username = database user.

        database_name = the name of the database you want to backup.

        filename = name of the output file with sql extension.

        Alternatively, you can also try "Download a MySQL Database Backup" from cPanel of that account. It will download a file in .sql.gz format.
        Backup is a feature provided by the web hosting provider. I think it is better to add this feature in your plan rather than doing it manually. They will take care of backing up your database regularly.

        Comment

        Working...
        X