Chapter 1. Backing up Red Hat Advanced Cluster Security for Kubernetes
You can perform data backups for Red Hat Advanced Cluster Security for Kubernetes. You can use these backups for data restoration in the case of an infrastructure disaster, or corrupt data.
You can configure automatic or on-demand backups by integrating with Amazon S3 or Google Cloud Storage. Or you can perform on-demand backups by using the roxctl command-line interface (CLI).
The backup includes the entire Red Hat Advanced Cluster Security for Kubernetes database, which includes all configurations, resources, events, and certificates. Make sure that backups are stored securely.
If you are using Red Hat Advanced Cluster Security for Kubernetes 3.0.53 or older, the backup does not include certificates.
1.1. On-demand backups by using the roxctl CLI Copy linkLink copied to clipboard!
You can use the roxctl CLI to take the backups by using the backup command. You require either an API token or your administrator password to run this command.
1.1.1. On-demand backups by using an API token Copy linkLink copied to clipboard!
You can back up the entire database of Red Hat Advanced Cluster Security for Kubernetes by using an API token.
Prerequisites
-
You must have an API token with the
Adminrole. -
You must have installed the
roxctlCLI.
Procedure
Set the
ROX_API_TOKENand theROX_CENTRAL_ADDRESSenvironment variables:export ROX_API_TOKEN=<api_token>
$ export ROX_API_TOKEN=<api_token>Copy to Clipboard Copied! Toggle word wrap Toggle overflow export ROX_CENTRAL_ADDRESS=<address>:<port_number>
$ export ROX_CENTRAL_ADDRESS=<address>:<port_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
backupcommand:For Red Hat Advanced Cluster Security for Kubernetes 3.0.55 or later:
roxctl -e "$ROX_CENTRAL_ADDRESS" central backup
$ roxctl -e "$ROX_CENTRAL_ADDRESS" central backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Red Hat Advanced Cluster Security for Kubernetes 3.0.54 or older:
roxctl -e "$ROX_CENTRAL_ADDRESS" central db backup
$ roxctl -e "$ROX_CENTRAL_ADDRESS" central db backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow
By default, the roxctl CLI saves the backup file in the directory in which you run the command. You can use the --output option to specify the backup file location.
1.1.2. On-demand backups by using the administrator password Copy linkLink copied to clipboard!
You can back up the entire database of Red Hat Advanced Cluster Security for Kubernetes by using your administrator password.
Prerequisites
- You must have the administrator password.
-
You must have installed the
roxctlCLI.
Procedure
Set the
ROX_CENTRAL_ADDRESSenvironment variable:export ROX_CENTRAL_ADDRESS=<address>:<port_number>
$ export ROX_CENTRAL_ADDRESS=<address>:<port_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
backupcommand:For Red Hat Advanced Cluster Security for Kubernetes 3.0.55 or later:
roxctl -p <admin_password> -e "$ROX_CENTRAL_ADDRESS" central backup
$ roxctl -p <admin_password> -e "$ROX_CENTRAL_ADDRESS" central backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow For Red Hat Advanced Cluster Security for Kubernetes 3.0.54 or older:
roxctl -p <admin_password> -e "$ROX_CENTRAL_ADDRESS" central db backup
$ roxctl -p <admin_password> -e "$ROX_CENTRAL_ADDRESS" central db backupCopy to Clipboard Copied! Toggle word wrap Toggle overflow
By default, the roxctl CLI saves the backup file in the directory in which you run the command. You can use the --output option to specify the backup file location.