Create backup destination via command line

CanSpace

Well-Known Member
PartnerNOC
Nov 25, 2011
70
60
68
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?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston

CanSpace

Well-Known Member
PartnerNOC
Nov 25, 2011
70
60
68
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?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
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.