Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Create backup destination via command line

Discussion in 'Data Protection' started by CanSpace, Jan 9, 2019.

  1. CanSpace

    CanSpace Member

    Joined:
    Nov 25, 2011
    Messages:
    22
    Likes Received:
    2
    Trophy Points:
    53
    cPanel Access Level:
    DataCenter Provider
    We are trying to automate the deployment of new servers - one thing we need to do is create a remote backup destination on new servers. The process is fairly simple if we just copy a template .destination file into /var/cpanel/backups/ - but the problem is that the password inside these .desination files seems to be encrypted so I can't see how to change it.

    What method is used for encrypting these passwords so that we can automate it?
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    481
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. CanSpace

    CanSpace Member

    Joined:
    Nov 25, 2011
    Messages:
    22
    Likes Received:
    2
    Trophy Points:
    53
    cPanel Access Level:
    DataCenter Provider
    Thanks. In the past when we were using an NFS mount we just copied the .destination file into the directory mentioned above, which is much simpler than making an API call. The only issue is that we are now using an rsync destination so we need to input a password and cannot figure out how it is encrypted. any ideas?
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    481
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @CanSpace

    There really isn't a way to do this, and it shouldn't make a difference whether you're using NFS or something else. The whmapi1 function shouldn't be difficult to implement once you've added your details to it if you're using the same backup destination.

    This is the only supported way of doing what you're requesting as well.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice