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.
The --dbbackup schema option to pkgacct should accomplish what you need. When provided, the database data is not included in the resulting cpmove file. However the database names, usernames, and permissions are included.
The --dbbackup schema option to pkgacct should accomplish what you need. When provided, the database data is not included in the resulting cpmove file. However the database names, usernames, and permissions are included.
Are you looking to have it backup the schema and not the data, or just an empty file for the database?
Are you looking to have it backup the schema and not the data, or just an empty file for the database?
To be honest, either would be fine (as schemas are not going to require a lot of I/O or diskspace!), but I was thinking a completely empty, schemaless DB when I wrote this!
To be honest, either would be fine (as schemas are not going to require a lot of I/O or diskspace!), but I was thinking a completely empty, schemaless DB when I wrote this!
This would be a real time saver, would love to see the option implemented.
This would be a real time saver, would love to see the option implemented.
@cPanel Why is this topic still under open discussion and not yet implemented?
This would really speed up cpbackup and save a lot of disk space for anyone using any 3rd party backup solution that backs up the entire server and takes consistent mysql backups.
@cPanel Why is this topic still under open discussion and not yet implemented?
This would really speed up cpbackup and save a lot of disk space for anyone using any 3rd party backup solution that backs up the entire server and takes consistent mysql backups.
The --dbbackup schema option to pkgacct should accomplish what you need. When provided, the database data is not included in the resulting cpmove file. However the database names, usernames, and permissions are included.
The --dbbackup schema option to pkgacct should accomplish what you need. When provided, the database data is not included in the resulting cpmove file. However the database names, usernames, and permissions are included.
Replies have been locked on this page!