New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
A simple cPanel/MYSQL backup solution.
Ash_Hawkridge
Member
I was just wondering if anybody had a quick and simple method of backing up MYSQL databases for cPanel accounts, possibly by cron or something?
We want to back our WHMCS/Wordpress databases up every 15 minutes or so, since WHMCS only has a once daily option available (As does the new cPanel/WHM backup system).
Opinions and solutions appreciated
Comments
15 minutes looks a little over-necessary.
I gather you have never had to trace missing transactions back to WHMCS when a couple hours of data is missing from a backup, its not nice :P
The other reason is that we have a second webserver on "Hot-standy" if you will, with an exact copy of our website on it, so if our main server ever goes down all we need to do is update the DB and switch the A record for our domain.
You may try this:
http://www.lunarforums.com/web_hosting_tutorials_faqs_and_resources/site_and_mysql_backups_via_cron-t22118.0.html
If not enough, one of these should be working for you:
http://www.noupe.com/how-tos/10-ways-to-automatically-manually-backup-mysql-database.html
Here's the script I use on a 15 minute cronjob.
Dumps the database from MySQL to a directory, then S3cmd pushes all files in the cue up to S3.
Once they're safe and sound, all database backups are deleted from the cue folder.
You could very, very easily change this to replace s3cmd with rsync
If you don't mind paying, i usually use Bacula4Hosts
@GetKVM_Ash
http://www.hostliketoast.com/developer-channel/
Scroll down to -- cPanel and Webhosting Tools
I've been using the full backup for over a week pushing to a BlueVM box, works fine, put it in a cron job. They also have just the MySQL portion as well.
R1Soft
Have to love R1soft. But if you don't want to buy a licence:
Thank you all guys, going to give them all a try and see which works best, will update with results!
mysqldump'ing every 15 minutes could be a disaster, if tables are locked when someone is midway through a purchase.
Look carefully at the mysqldump options, like --lock-tables and --single-transaction (for InnoDB). Or replication....
Why are you hosting your website on cpanel!
We use https://github.com/meskyanichi/backup to backup ours but its not cpanel.
Here's a backup script I posted a while back on my blog:
http://www.georgetasioulis.com/cpanel-backup-script-to-amazon-s3/
You can modify it to not backup the account's home directory by adding the
--skiphomedir
parameter on line 32.If you want to go the R1Soft way, you can setup a VPS on a different location than your cPanel server and install CDP Enterprise Server there. Then install the CDP Agent on your cPanel server and 15-minute backups won't be a problem
For a years worth of backups you need about 2x the storage space of your source server's capacity.
PM me for cheap licenses
Why not, we manage multiple domains from one dedicated cPanel server?
@George_Fusioned
Thank you George, will check that out too.