mbressman

Active Member
Jan 31, 2006
40
0
156
I'm on a shared hosting cPanel account (I'm also a reseller - but mostly so I can keep the accounts of a few select clients and friends/family separate from mine), and am wondering if there is any 3rd party software that I can install on my account (and maybe some of the resold sub-accounts) to do ongoing backups (mostly of MySQL databases, but possibly of files, etc.).

The hosting provider does backups, but I've learned to always have my own backups just in case. In the past, I've just done MySQL backups to a local server I have via cron jobs, but would be great to get some software that could do backups to a Google Drive account, or a OneDrive account, or via FTP, or something else.

Any info is greatly appreciated. Thanks!
 

mbressman

Active Member
Jan 31, 2006
40
0
156
You can create backups on demand from with cpanel itself. I do not believe you can schedule these though.
I definitely would need something that can do scheduled backups. That's what I was looking for some sort of 3rd party software I could install on a cPanel shared hosting account.
 

mbressman

Active Member
Jan 31, 2006
40
0
156
I took a quick look, but that looks beyond me, and also looks like something that would require some serious permissions and/or changes, and since I only have a shared account with reseller privileges (some basic WHM access), I'm not sure if that is applicable? But maybe I'm wrong...
 

mbressman

Active Member
Jan 31, 2006
40
0
156
Shouldn't be a problem.
Just create a cron job that executes the following command:
Code:
uapi Backup fullbackup_to_homedir
That will create a backup of your account.
OK, although I'm looking to do the backup elsewhere (not on the same server since that would sort of defeat the purpose of having the backup). And it would be great (if the backup was going to grab EVERYTHING), if it could do some sort of incremental backup? And also looking to do it to Google Drive, or OneDrive. FTP is good, but Google Drive/OneDrive/etc. would be even better.

I'm honestly amazed no such 3rd party software exists like this...
 

mbressman

Active Member
Jan 31, 2006
40
0
156
I'm pretty sure it does grab everything.

You can create a bash script that executes the command and then upload it to Google Drive.
No idea how to do that (probably the reason I'm looking for a software package that just does it for me, haha). Any sites out there that give a tutorial?
 

DennisMidjord

Well-Known Member
Sep 27, 2016
272
39
78
Denmark
cPanel Access Level
Root Administrator
How to upload a file to Google Drive from the command line

Seems pretty simple, but requires the gdrive application to be installed on the server. This is not incremental, though.
There's also JetBackup that allows you to upload to Google Drive, but that will require you to have root access to the server.
Code:
#!/bin/bash

date=`date +%d.%m.%Y`
time=`date +%H-%M-%S` 

#Create the backup
uapi Backup fullbackup_to_homedir [email protected]

#Wait 1 hour before attempting to upload backup (could also be configured to wait for PID for the backup to finish)
sleep 3600

#Upload the file
gdrive upload /home/username/backup-$date_$time_username.tar.gz
I haven't tested it, so no idea if it actually works.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
These suggestions are all great, but if you're looking for a plugin your provider may have something available - we do partner with JetBackup though your provider would have to have purchased a license for this and have it installed on the server and available for your account in order for you to use it.
 

mbressman

Active Member
Jan 31, 2006
40
0
156
These suggestions are all great, but if you're looking for a plugin your provider may have something available - we do partner with JetBackup though your provider would have to have purchased a license for this and have it installed on the server and available for your account in order for you to use it.
My provider hasn't been able to help me with this. It doesn't look like what I'm searching for actually exists. My hosting provider does provide JetBackup, but that's not really what I'm looking for (at least not how they've implemented it - not sure if it can be implemented in different ways) since it doesn't give me the ability to schedule different types of backups offsite. It just gives me access to download their backups manually.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @mbressman

Yea they'd have to create the destination for you and the schedule but it is possible for them to do but not for you to manage through cPanel alone.

The custom script provided though should give you the power you need to complete the backups though, pending you have permissions for backup creation on the account.
 

mbressman

Active Member
Jan 31, 2006
40
0
156
Hi @mbressman

Yea they'd have to create the destination for you and the schedule but it is possible for them to do but not for you to manage through cPanel alone.

The custom script provided though should give you the power you need to complete the backups though, pending you have permissions for backup creation on the account.
I don't think I'd want to give the hosting provider access to my Google Drive, or OneDrive, or wherever the off-site destination is for the backups.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
I don't think I'd want to give the hosting provider access to my Google Drive, or OneDrive, or wherever the off-site destination is for the backups.
Completely understandable.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston