linux4me2

Well-Known Member
Aug 21, 2015
259
78
78
USA
cPanel Access Level
Root Administrator
i'm looking at the Databases section of the documentation for WHM Backup Configuration. It lists three options for database backups:
  1. Per Account Only — Only back up the databases for each account. This setting uses the mysqldump utility.
  2. Entire MySQL Directory — Back up all of the databases on the server from the /var/lib/mysql/ directory.
  3. Per Account and Entire MySQL Directory — Perform a comprehensive backup that copies all of the databases for each individual account and all of the databases on the server.
Next, it gives a scary warning which I believe refers to option #3:
Warning:
Exercise extreme caution if you select this setting. This setting backs up your databases without stopping MySQL®. This action causes InnoDB issues in the backup file. The system can’t restore backup files with InnoDB issues.
All my tables are InnoDB, so if I'm correct that the warning refers to option #3, it's not a good way for me to go. That leaves only options #1 and #2.

It seems like option #1 will make it easiest to restore a database for an individual account, but there are some databases in /var/lib/mysql/ that aren't associated with user accounts I should probably be backing up as well. What I'm wondering is that if I go with option #2, will the users' databases still be in the <date>/accounts/username.tar.gz files that Backup creates? Does option #2 use mysqldump so that InnoDB issues aren't created?
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,745
307
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
You only want to use Option 1. The only time this causes an issue is if you have manually created a database not through the cPanel account interface because that database would not be tied to a user and would not get backed up.

If that is the case then you can use the database map tool in whm to attach a database to a user.
 

linux4me2

Well-Known Member
Aug 21, 2015
259
78
78
USA
cPanel Access Level
Root Administrator
You only want to use Option 1. The only time this causes an issue is if you have manually created a database not through the cPanel account interface because that database would not be tied to a user and would not get backed up.

If that is the case then you can use the database map tool in whm to attach a database to a user.
Thanks! That's what I needed to know. I don't have any databases created outside of cPanel's UI, so I'll go with option #1.

It's probably been set on opion #3 since I got this server, and I'm glad I haven't needed a database backup and run into those "InnoDB issues."
 
  • Like
Reactions: Spirogg

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,745
307
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Well, you DID say:

there are some databases in /var/lib/mysql/ that aren't associated with user accounts

So, those should be mapped to user accounts if you do have them.
 
  • Like
Reactions: Spirogg