skip to Main Content

I use a server with WHM. I created monthly backup, it makes full server backup to /backup folder. I can create targz file with SSH, I know how to download gziped file with pscp, but I don’t know how to download it from server with link in browser. I think it’s possible, because sysadmin before me did it.
Can anybody help me with that?

2

Answers


  1. You want to generate a link that you can access through your browser and will be served up by the web server? (your question is a little vague)

    These files are stored out of the standard web directories so you could create a symlink in the public_html folder of your website to /backups and call it something obscure so it can’t be easily scraped.

    So for example public_html/my-secure-backup-folder can be a symlink to /backups.

    Guide on creating a symlink here: https://www.namecheap.com/support/knowledgebase/article.aspx/9561/29/how-to-create-a-symbolic-link-in-cpanel

    Login or Signup to reply.
  2. Easiest way to proceed:

    Ssh to your WHM server then decide which cpanel account you need to backup. Create a full backup for that cpanel:

    cd /home/cpaneluser/public_html
    /script/pkgacct cpaneluser /home/cpaneluser/public_html
    chown cpaneluser:cpaneluser /home/cpaneluser/public_html/cpmove-cpaneluser.tar.gz*
    

    Then you can download the backup using your web browser by accessing your cPanel user’s domain -> http://domain.tld/cpmove-cpaneluser.tar.gz

    If you don’t know the actual domain for that cPanel user you can do a cat /etc/userdomains | grep cpaneluser. It will show the configure domain for that account.

    That would be all.

    Alternatively you can login to the cPanel account using your web browser -> http://domain.tld/cpanel using the user/password combination for that cPanel account. There is a full backup function there (in the cPanel web interface) that does pretty much what I have explained earlier.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search