cPanel & WHM Version 114 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Change WHM cpanel Backup to allow Database only backups

ethical shared this idea 7 years ago
Open Discussion

ok so I did see a more detailed feature request here that includes this

however I feel this is more important in and of itself to be a separate request so that perhaps it can get done sooner, and I could not find anything else similar.

so cpanel, please make it so that we can backup ONLY databases and not the homedir if we so choose.

this can be done simply if we leave this unchecked

Backup Accounts

but we have

Entire MySQL Directory

selected under database backups.

many servers run r1soft or bacula or other scripts to grab file but we all know restore dbs from these backups can sometimes be quite a pain. Being able to grab a backup of a database that is not a part of those systems is way faster and easier.

the other solution is to have 2 different global settings for backup preferences, one for end user CPANELS and one for just the WHM backup script so when i add in an exclude of the homedir this will NOT affect the end user full site backup. this may be easier and simpler to implement.

OR createa a "local" exclude for admins that applies only the schedule created in the WHM.

Replies (4)


Thank you so much for this! I think you're really on to something here. What I'm reading from you is this:

  • As a system administrator I would like the ability to configure cPanel account backups to exclude the content of the cPanel account's homedir, but retain the account data and the database content.

Does that sound about right?

I also wanted to mention that if a user initiates a Home Directory backup in cPanel's Backup interface (Home >> Files >> Backup), the global and local exclude files do not affect the contents of the backup file.


yes but without affecting the FULL cpanel backup that a user creates in an end user cpanel. I dont feel like explaining to my customers that a full cpanel backup is not actually a full cpanel backup and that they have to click the homedir backup instead to get their files backed... not a solution in my opinion.

basically there needs to be a separate overrides just for admin backups.


We allready do this with :

  1. #!/usr/bin/perl
  2. BEGIN { unshift @INC, '/usr/local/cpanel'; }
  3. use Cpanel::Config::Users ();
  4. my @cpusers = Cpanel::Config::Users::getcpusers();
  5. foreach my $user (@cpusers) {
  6. my $cmd = "/scripts/pkgacct --skiphomedir " . $user . " 2>&1";
  7. open my $OUTPUT, '-|', $cmd or next;
  8. while (<$OUTPUT>) {
  9. print $_;
  10. }
  11. close $OUTPUT or next;
  12. }

We have a cron that runs daily so that we can just rsync or backup with R1Soft the server data while keeping the ability to conserve everything outside the user's directory.


any chance you know how to adjust this to save to an alternate mount attached drive?


thanks for posting that! how can i tell it to save the files to an alternate mounted attached drive? its unclear to me how i would do that in the script.

Leave a Comment
Attach a file