Create backup destination via command line
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?
-
Hi @CanSpace You can use the whmapi1 to configure backups on your server: WHM API 1 Functions - backup_config_set - Developer Documentation - cPanel Documentation And for the transport you can use the whmapi1 backup_destination functions: WHM API 1 Functions - backup_destination_add - Developer Documentation - cPanel Documentation and modify it with: WHM API 1 Functions - backup_destination_set - Developer Documentation - cPanel Documentation Thanks! 0 -
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? 0 -
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. 0
Please sign in to leave a comment.
Comments
3 comments