The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Database dump syntax ?

Discussion in 'Database Discussions' started by oldlock, Aug 6, 2013.

  1. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    Can anyone please advise the correct syntax to :

    Backup an existing database by SSH and write the resulting file to the server where it can then be retrieved via FTP ?

    TIA
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    That threw back an error - should there be a password in that string ??
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Try this:
    Code:
    mysqldump --opt -Q -u dbUsername_dbUsername -p dbUsername_dbName > /path/to/save/bu/to/backupname.sql
    Type in password when asked.
     
  5. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    That worked perfectly. Very quick too. Thanks.
     
Loading...

Share This Page