The intended audience for this workbook is integrators and consultants, along with client stakeholders. For 30-days worth of backups for all of my 75 websites, I spend about $1.50/month paying for S3, so the cost is very minimal.Overview The purpose of the workbook is to provide guidelines to ensure a successful Crestron Fusion deployment at the point that requirements are determined by the parties. Not to mention, S3 storage is very cheap. I also really enjoy the fact that it automatically uploads the backups to S3, and then deletes them from my reseller server. It’s definitely not perfect, but it does the job, and it prevents me from having to manually run the backups for each one of the sites I manage. The second script then runs, and looks in this directory for files to upload to AWS S3: ' Once this script runs, it then copies all of the backups to a folder called “/backups”. Obviously not very secure, but I haven’t ran into any issues thus far. I believe the script could be fairly easily edited to allow separate passwords for each account, but I just haven’t bothered.
XPANEL SCHE PASSWORD
You can generate that API key within your WHM panel using the “Manage API Tokens” section:Īs of right now, the only downside with this script is that ALL cPanel user accounts must use the same password in order to be backed up. I’ve bolded the text above, in all the locations where you need to replace the values with your own inputs.įor the above script to work, you’re going to need a WHM API Key so that the script can gain access to all your cPanel accounts. you may want to add some logging here. $result = file_get_contents($url, false, $context) $context = stream_context_create($options) 'header' => "Content-type: application/x-www-form-urlencoded\r\nAuthorization: Basic $auth\r\n", #loop through accounts, create backup, upload $accounts = json_decode($response, true) To save response in a variable from server, set headers Ĭurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) Ĭurl_setopt($ch, CURLOPT_HTTPHEADER, $headers) From there, I have it set to run once per week: :2087/json-api/listaccts?api.version=1&want=user,domain" Create a PHP file called “backup.php”, and save it to the main hosting account inside your WHM panel. The second script then takes that backup, and automates the upload from my reseller server to an S3 bucket for safe keeping.
XPANEL SCHE FULL
The first script generates a tar file with a full backup of the site (including all files and database dumps). Searching Google didn’t come up with much, so instead, I generated my own two-part script.īoth of these scripts are scheduled via cronjob.
XPANEL SCHE MANUAL
And I currently have around ~75 clients, which would make it very difficult for me to take manual backups of each website on a weekly basis.
![xpanel sche xpanel sche](https://gray-kplc-prod.cdn.arcpublishing.com/resizer/-zqTN2ULXmWSxZHxdtgEX1rZuoM=/1200x1800/smart/filters:quality(85)/cloudfront-us-east-1.images.arcpublishing.com/gray/KCDWSMFY2VDXNCCDLXVS3K4RDA.jpg)
cPanel offers a way to take backups, but it’s not automated. I, too, had this problem when I first began selling hosting accounts. However, one of the most frequent questions I get is “ How can I automate backups in cPanel?”
![xpanel sche xpanel sche](https://slidetodoc.com/presentation_image/431ab1b32aedd4425dad9348fb1ef2e4/image-30.jpg)
To my surprise, that playlist has blown up, and many people have found it incredibly useful. Right now, a couple thousand dollars per month passively. I built a playlist on YouTube, talking about how I earn passive income by selling hosting accounts via a Reseller.