New/Updated: cPanel MySQL Database Backup Script – Now Deletes Old Backups

by Paul on February 13, 2013

cPanel Backup Script Download

Second most popular download behind our free cPanel backup script is our MySQL backup script for cPanel.

Both are still downloadable for free from the Developer Channel.

Like our premium WHM/cPanel backup script, it was lacking one all-important, and again our #1 most requested, feature.

Today we’re releasing an all-new version of the script that adds support for it (and more)- and so what is this fantastic new cPanel database backup feature…?

cPanel Automatic Database Script Now Deletes Old Backups

We are releasing an all-new backup script for cPanel that lets you download all database backups from your cPanel account.

It then lets you FTP-copy these files to any FTP server you like (using FTP or SFTP).

And, now, it will delete old database backup files from this FTP space!

Depending on how you configure it, you can have it delete all backup files more than a day old, a week old… however long you like!

And it’s completely automatic!

Please be aware that the latest version of this script is a premium purchase. You may however always download and use the free version of the cPanel database backup script here.

How does deleting old cPanel backups work?

We’ve provided the option to let you to delete backups on a remote FTP space, based on the number of days you specify.

So for example, if you specify 7 as the age for old backups, this script will connect to your remote FTP space that you specified for remote cPanel backups, find all the .GZ files in that folder and query their last modified dates.

In this example, it will compare these file dates to the date in time 7 days before the instant the backup script is running.

If it finds any .gz files that are older than this date, the files will be immediately deleted.

This script does not discriminate files. If you are storing other .gz files in this folder and they are older than the specified date they will also be deleted.

What other features are in this new cPanel database backup script?

The improvements made to this backup script are many:

  • ‘Dummy Mode’ – when enabled (turned on by default) the script will process exactly as normal, but will neither perform the backups, nor delete any old files. Instead it will just print a log of what it would do. This is perfect for testing your configuration and FTP connection details, and seeing that it works exactly as expected.
  • Supports the latest version of cPanel/WHM (v11.34 at the time of writing).
  • Supports use of both secure and non-secure WHM/cPanel access using ports that you specify. You are responsible for ensuring any SSL implementation on you cPanel is working if you decide to use a secure connection.
  • Support for custom log files, or to print to STDOUT. You can chose which, and where.
  • Full support for specifying the remote FTP or SFTP connection details.
  • The option to automatically delete old files from FTP (see restrictions below)

What restrictions does this cPanel database backup script have?

Depending on either development complexity, or cPanel API limitations, the following restrictions are in-place and should be carefully considered when deciding to purchase this script:

  • Not Supported: Download of non-mysql database. This has not been tested.
  • Not Supported: FTPS / FTP-ES.  Only FTP and SFTP are supported at this time (your PHP environment must itself support SFTP)
  • Not Supported: Deleting old backup files from an FTP location other than that used to remotely backup the files in the first place.
  • Not Supported: Working around your firewalls, PHP environment, security restrictions etc. As with the 1st version of this script, a pre-requisite to purchasing this script is that you have downloaded, configured, and successfully completed a backup using the free version of our cPanel MySQL database backup script.
  • Not Supported: Copying files to Amazon S3, Dropbox, or Google etc. Why? This isn’t directly supported by the cPanel API. An alternative option for this is to use an automatic copy service such as FTP2Cloud where you FTP your backups here, and they copy it to your cloud storage account.
  • Not Supported: Future proof against cPanel / WHM updates that suddenly break the script. We use these scripts ourselves, though we rely more on WorpDrive to maintain our WordPress backups. If the script stops working, we’ll probably fix it. But this line is here so that you are aware that the license is not an ongoing license. Updates and changes are made to the script and released solely at our discretion. We may charge for future updates, or we may not. Or both. It’s our call.

If none of these restrictions poses a problem for you, then this script is perfect for you.

Add To Cart

Use the form below to join our Developer Channel

Do you need an automated CPanel web hosting backup script? There is that and more in the Developer Channel

{ 0 comments… add one now }

Leave a Comment

Previous post: