Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using WHM's automated backup system to make daily backups of my database. I have it set that it only makes a backup of what has changed. I've had this running for a while now and thought it was working fine until I tried downloading the backup today, and realized there was nothing in it. The only text inside of the sql file is:

-- MySQL dump 10.11
-- Host: localhost    Database: pokerrpg_pokerrpg
-- ------------------------------------------------------
-- Server version   5.0.81-community-log

/*!40101 SET NAMES utf8 */;
/*!40103 SET TIME_ZONE='+00:00' */;
share|improve this question

closed as off-topic by HopelessN00b Jan 13 '15 at 20:51

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 13 '15 at 20:51
up vote 0 down vote accepted

Do you have WHM set to keep weekly or monthly backups as well? Check the /pathtobackupfolder/cpbackups/weekly/ and see if you happen to have a full copy in there. I've personally never had anything but frustration come from trying to use WHM's backup feature. It's really just an un-tarred pkgacct file. You can do some really simple mysql backups with mysqldump and cron.

/usr/bin/mysqldump -u db_user -pdb_user_pass db_name > /full/path/to/dumpfile.sql

Where 'db_user' is the database username, 'db_user_pass' is that database user's password, 'db_name' is the name of the database to be dumped, and '/full/path/to/dumpfile.sql' is the location that you'd like the database to be dumped to.

You can also create a .my.cnf (note leading . is needed) in your /home/username directory containing the following:

password = DBPASSWORD
host = localhost

database = DBNAME

(Where DBUSERNAME, DBPASSWORD, DBNAME refer to Database username, password, and database name.)

Adding this as your cron job:

mysqldump > /full/path/to/dumpfile.sql

You can set up cron jobs through cPanel->'Cron Jobs'

share|improve this answer
No, I just have it set to save daily. The problem with this is that I am saving to a 20GB NAS and my database is around 1.5GB, so this would fill up quickly without the feature that WHM has to only save what has changed. – James Simpson Jul 26 '09 at 2:44
Ick, if that's the case I would hit up cPanel support and tell them to fix their shi**y backup system, but since that never works, I would do a couple of tests. Since you don't have anything now, it seems like you can play with the settings a bit.. I would delete the ../daily folder and run the backup manually /scripts/cpbackup then make some changes and run it again. After you do that check in /usr/local/cpanel/logs/error_log (maybe others) and see if anything sticks out. – jemmille Jul 26 '09 at 3:11

Yes, I was just testing one of my backup after so long. Guess what, the "Account Restore" backup only created the database, but not the tables/data inside it.

I should try your mysqldump.


share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.