Perform backend management with tridentctl
Learn about how to perform backend management operations by using tridentctl
.
Create a backend
After you create a backend configuration file, run the following command:
$ tridentctl create backend -f <backend-file> -n trident
If backend creation fails, something was wrong with the backend configuration. You can view the logs to determine the cause by running the following command:
$ tridentctl logs -n trident
After you identify and correct the problem with the configuration file, you can simply run the create
command again.
Delete a backend
To delete a backend from Astra Trident, do the following:
-
Retrieve the backend name:
$ tridentctl get backend -n trident
-
Delete the backend:
$ tridentctl delete backend <backend-name> -n trident
If Astra Trident has provisioned volumes and snapshots from this backend that still exist, deleting the backend prevents new volumes from being provisioned by it. The backend will continue to exist in a “Deleting” state and Trident will continue to manage those volumes and snapshots until they are deleted. |
View the existing backends
To view the backends that Trident knows about, do the following:
-
To get a summary, run the following command:
$ tridentctl get backend -n trident
-
To get all the details, run the following command:
$ tridentctl get backend -o json -n trident
Update a backend
After you create a new backend configuration file, run the following command:
$ tridentctl update backend <backend-name> -f <backend-file> -n trident
If backend update fails, something was wrong with the backend configuration or you attempted an invalid update. You can view the logs to determine the cause by running the following command:
$ tridentctl logs -n trident
After you identify and correct the problem with the configuration file, you can simply run the update
command again.
Identify the storage classes that use a backend
This is an example of the kind of questions you can answer with the JSON that tridentctl
outputs for backend objects. This uses the jq
utility, which you need to install.
$ tridentctl get backend -o json | jq '[.items[] | {backend: .name, storageClasses: [.storage[].storageClasses]|unique}]'
This also applies for backends that were created by using TridentBackendConfig
.