pkgacct: add feature to skip database data, but not database existence
We have an existing, 3rd party backup solution that backs up the entire server and takes consistent mysql backups each time a system snapshot is taken. We run these backups 6 times a day.
In order to protect against customers accidentally deleting (or in the event that they wish to undelete) a cpanel account, we also use a script that fires every night to backup all cpanel account metadata by calling pkgacct for every account with "--skiphomedir" set. If a customer deletes a cpanel account, we restore the metadata using the cpmove file, and then seperately restore their files and database from our 3rd party backups.
The reality is, however, that we are creating cpmove files containing mysql data when it simply isn't necessary - this means more I/O and larger backups - using the existing --skipacctdb completely ignores the existence of mysql databases and users altogether, which isn't really much of a solution either.
I would like to request the addition of a variation on --skipacctdb (perhaps --skipacctdbdata) that still takes account of the existence of databases, and the credentials configured to access them, but does not actually dump the contents of the databases at the time of backup, and when restored simply creates empty databases. This shouldn't be too complicated to add; it's essentially like the regular backup - just without a mysqldump.