The rebuild_dbmap Script
Valid for versions 82 through the latest version
Version:
82
Last modified: December 7, 2022
Overview
If the database map is corrupt for a cPanel user, you can use the /usr/local/cpanel/scripts/rebuild_dbmap
script to rebuild that user’s database map.
- Only the
root
user can run this script. - The system treats each option individually. If you pass an invalid value with an option, the script will fail.
Run the script
To run this script on the command line, use the following format:
/usr/local/cpanel/scripts/rebuild_dbmap dbuser
Options
Use the following options with this script:
Option | Description | Example |
---|---|---|
dbuser |
Required The cPanel user for whom to rebuild map information. | example |
--noop |
Display the results of a test run of the script, but do not perform any changes. | --noop |
--help |
Display the script’s help documentation. | --help |
Examples
The following example displays the results for the example
user but does not perform any changes:
/usr/local/cpanel/scripts/rebuild_dbmap example --noop
If the script succeeds, the output will resemble the following example:
|
|
The following example generates and installs the database map data for the example
user:
/usr/local/cpanel/scripts/rebuild_dbmap example
If the script succeeds, the output will resemble the following example:
|
|
Files
This script writes to database map files in the /var/cpanel/databases/
directory. In the example given above, the script rebuilds the /var/cpanel/databases/example.json
file, which will resemble the following example:
|
|