Knowledge Base
What database user permissions are needed to back up and restore?
Overview
By the end of this article, you will know which permissions the database user you give to CodeGuard must have, and be able to select or create a user that holds them. The article explains why a dedicated database user is used, lists the permissions required for backup and the permissions required for restore in a single reference table, and describes how to verify the user has what it needs. Backup and restore use different permissions, so a user granted only the backup set cannot complete a restore.
Why the database user's permissions matter
CodeGuard connects to your database as a database user that you specify during setup. That user's permissions determine what CodeGuard can do: reading table data for a backup and writing data back during a restore require different privileges.
If the user holds only the permissions needed for backup, backups will run but a restore will fail when it is needed most. Sectigo therefore recommends selecting or creating a user that holds the full set of permissions listed below, covering both operations.
Permissions required
Grant the database user the following permissions. The table shows which operation each permission supports.
| Permission | Needed for backup | Needed for restore |
|---|---|---|
| [Add permission name from product documentation] | No] | No] |
| [Add permission name] | No] | No] |
| [Add permission name] | No] | No] |
| [Add permission name] | No] | No] |
Figure 1: Database user permissions required by CodeGuard for backup and restore
How to verify the user has the required permissions
Open your database control panel and review the permissions assigned to the user you gave to CodeGuard. Compare them against the table above and grant any that are missing. After the user is updated, add or re-add the database in CodeGuard and confirm that the first backup completes.
Troubleshooting
Issue: Backups complete successfully but a restore fails.
Cause: The database user holds the permissions needed to read data but not those needed to write it back.
Solution: Grant the user the restore permissions listed in the table above, then run the restore again.
Issue: CodeGuard cannot read the database during a backup.
Cause: The database user does not have the permissions needed to read the tables in that database.
Solution: Confirm the user is assigned to the correct database and holds the backup permissions listed above.
Similar questions
- What permissions does CodeGuard need on my database?
- Which database privileges are required for a CodeGuard restore?
- Why did my database restore fail but the backup worked?
- CodeGuard database user permissions
- What user should I create for CodeGuard database backups?
Need assistance?
Contact our team for help with your purchase or issuing your certificate.