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.

wget downloads empty database

Discussion in 'General Discussion' started by swecs, Jan 1, 2007.

  1. swecs

    swecs Registered

    Joined:
    Jan 1, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi, just wondering if anyone has had the problem where you download a mySQL backup through cPanel and it works out fine, but if you try the same thing via WGET, it downloads an empty file?

    The command line in WGET is fine (exactly the same as in cPanel), it downloads fine, no errors, but the downloaded file is always 20KB and empty. This is happening to me across all domains. Home directory backups working fine, this is only happening with databases.

    If anyone has experienced the same I'd love to know what is causing it - driving me crazy!

    Background: I'm trying to automate backups to my harddrive

    Cheers
    Graeme
     
  2. bhd

    bhd Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    149
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    JNB ZA
    cPanel Access Level:
    Root Administrator
    No sure if I understand you fully but here goes:

    Firstly, you cannot simply wget a database. You have to use mysql to create the .sql file first (which is what Cpanel can do for you). Second, wget will not work on a file that does not have FTP or HTTP access (like /home/user/backup-dir) without the account password, user name and path because by definition, the .sql file is stored in an area that does not have direct web access without the account password etc.
     
  3. swecs

    swecs Registered

    Joined:
    Jan 1, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    thanks
    sorry i can see my initial post wasn't very clear. other people are able to do this, either by using a command line like:

    wget.exe http://user:password@www.domainname.com:2082/getsqlbackup/ccrt1.gz

    or by using programs such as CP SiteSaver (which simply automate the command). Using that command will download the mysql backup, just the same way as if you clicked on the link in the Backup section of cPanel.

    So I was just checking if there might be any reasons why I can't when others can, or if anyone else has encountered a similar problem

    Cheers
    Graeme
     
  4. Nhojohl

    Nhojohl Well-Known Member

    Joined:
    Nov 28, 2006
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    If you have root access and shell you should be able to

    # cp /path/to/backup.gz /path/you/want/to/save/to
     
Loading...

Share This Page