Troubleshooting Central
Troubleshooting Central
Abstract
Chapter 1. Backing up Central database by using the roxctl CLI Copy linkLink copied to clipboard!
Central stores information about the following:
- Activity observed in your clusters
- Information retrieved from integrated image registries or Scanners
- Red Hat Advanced Cluster Security for Kubernetes (RHACS) configuration
Backing up the Central database is critical to ensure data integrity and system reliability. Regular backups of the database, which contain the necessary configurations, resources, events, and certificates, protect against database failures, corruption, and accidental data loss.
You can use the roxctl CLI to back up and restore the Central database by using the backup command. This command requires an API token or your administrator password.
1.1. On-demand backups by using an API token Copy linkLink copied to clipboard!
You can back up the entire database of RHACS by using an API token.
Prerequisites
-
You have an API token with the
Adminrole. -
You have installed the
roxctlCLI.
Procedure
Set the
ROX_API_TOKENand theROX_ENDPOINTenvironment variables by running the following commands:export ROX_API_TOKEN=<api_token>
$ export ROX_API_TOKEN=<api_token>Copy to Clipboard Copied! Toggle word wrap Toggle overflow export ROX_ENDPOINT=<address>:<port_number>
$ export ROX_ENDPOINT=<address>:<port_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Initiate a backup for Central by running the following command:
roxctl central backup
$ roxctl central backup1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- You can use the
--outputoption to specify the backup file location.
By default, the
roxctlCLI saves the backup file in the directory where you run the command.
1.2. On-demand backups by using the administrator password Copy linkLink copied to clipboard!
You can back up the entire database of RHACS by using your administrator password.
Prerequisites
- You have the administrator password.
-
You have installed the
roxctlCLI.
Procedure
Set the
ROX_ENDPOINTenvironment variable by running the following command:export ROX_ENDPOINT=<address>:<port_number>
$ export ROX_ENDPOINT=<address>:<port_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Initiate a backup for Central by running the following command:
roxctl -p <admin_password> central backup
$ roxctl -p <admin_password> central backup1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- For
<admin_password>, specify the administrator password.
By default, the
roxctlCLI saves the backup file in the directory in which you run the command. You can use the--outputoption to specify the backup file location.
Chapter 2. Restoring Central database by using the roxctl CLI Copy linkLink copied to clipboard!
You can use the roxctl CLI to restore Red Hat Advanced Cluster Security for Kubernetes (RHACS) by using the restore command. This command requires an API token or your administrator password.
2.1. Restoring by using an API token Copy linkLink copied to clipboard!
You can restore the entire database of RHACS by using an API token.
Prerequisites
- You have a RHACS backup file.
- You have an API token with the administrator role.
-
You have installed the
roxctlCLI.
Procedure
Set the
ROX_API_TOKENand theROX_ENDPOINTenvironment variables by running the following commands:export ROX_API_TOKEN=<api_token>
$ export ROX_API_TOKEN=<api_token>Copy to Clipboard Copied! Toggle word wrap Toggle overflow export ROX_ENDPOINT=<address>:<port_number>
$ export ROX_ENDPOINT=<address>:<port_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restore the Central database by running the following command:
roxctl central db restore <backup_file>
$ roxctl central db restore <backup_file>1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- For
<backup_file>, specify the name of the backup file that you want to restore.
2.2. Restoring by using the administrator password Copy linkLink copied to clipboard!
You can restore the entire database of RHACS by using your administrator password.
Prerequisites
- You have a RHACS backup file.
- You have the administrator password.
-
You have installed the
roxctlCLI.
Procedure
Set the
ROX_ENDPOINTenvironment variable by running the following command:export ROX_ENDPOINT=<address>:<port_number>
$ export ROX_ENDPOINT=<address>:<port_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restore the Central database by running the following command:
roxctl -p <admin_password> \ central db restore <backup_file>
$ roxctl -p <admin_password> \1 central db restore <backup_file>2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Resuming the restore operation Copy linkLink copied to clipboard!
If your connection is interrupted during a restore operation or you need to go offline, you can resume the restore operation.
-
If you do not have access to the machine running the resume operation, you can use the
roxctl central db restore statuscommand to check the status of an ongoing restore operation. -
If the connection is interrupted, the
roxctlCLI automatically attempts to restore a task as soon as the connection is available again. The automatic connection retries depend on the duration specified by thetimeoutoption. -
Use the
--timeoutoption to specify the time in seconds, minutes or hours after which theroxctlCLI stops trying to resume a restore operation. If the option is not specified, the default timeout is 10 minutes. -
If a restore operation gets stuck or you want to cancel it, use the
roxctl central db restore cancelcommand to cancel a running restore operation. - If a restore operation is stuck, you have canceled it, or the time has expired, you can resume the previous restore by running the original command again.
- During interruptions, RHACS caches an ongoing restore operation for 24 hours. You can resume this operation by executing the original restore command again.
-
The
--timeoutoption only controls the client-side connection retries and has no effect on the server-side restore cache of 24 hours. - You cannot resume restores across Central pod restarts.
- If a restore operation is interrupted, you must restart it within 24 hours and before restarting Central, otherwise RHACS cancels the restore operation.