Skip to main content

How can we help you?

Druva Documentation

Druvactl Utility

The druvactl utility is a standalone Druva Backup Operator management CLI tool. It supports Red Hat and Debian-based Linux distributions and can be independently downloaded from the Kubernetes Downloads page.

Reference Commands

Cluster Commands

C.1 Get Cluster detail

druvactl config show-cluster

C.2 Get Cluster Cloud

druvactl config show-cluster -o jsonpath='{.spec.cloud}'

C.3 Get Cluster Region

druvactl config show-cluster -o jsonpath='{.spec.region}'

C.4 Get Cluster ID

druvactl config show-cluster -o jsonpath='{.spec.clusterID}'

ApplicationGroup Commands

A.1 Get ApplicationGroups in a single namespace

druvactl get applicationgroups -n <namespace>

A.2 Get ApplicationGroups across all namespaces

druvactl get applicationgroups -A

A.3 Get a specific ApplicationGroup detail

druvactl get applicationgroup -n <namespace> <applicationgroup>

Backup Commands

B.1 Initiate a Backup

druvactl create backup -n <namespace> <applicationgroup>

B.2 Initiate a Backup with a recipe

druvactl create backup -n <namespace> <applicationgroup> --recipe <recipename>

B.3 Get Backups by ApplicationGroup

druvactl get backups -n <namespace> -g <applicationgroup>

B.4 Get Backups in a single namespace

druvactl get backups -n <namespace>

B.5 Get Backups across all namespaces

druvactl get backups -A

B.6 Get a specific Backup detail

druvactl get backup -n <namespace> <backup>

RestorePoint Commands

P.1 Get RestorePoints by ApplicationGroup

druvactl get restorepoints -n <namespace> -g <applicationgroup>

P.2 Get RestorePoints in a single namespace

druvactl get restorepoints -n <namespace>

P.3 Get RestorePoints across all namespaces

druvactl get restorepoints -A

P.4 Get a specific RestorePoint detail

druvactl get restorepoint -n <namespace> <restorepoint>

RestoreAccessRequest Commands

Q.1 Create a RestoreAccessRequest to restore, from a RestorePoint, on the same Cluster

druvactl create rar <name> -n <namespace> <restorepoint>

Q.2 Create a RestoreAccessRequest to restore, from a RestorePoint, on a different Cluster in the same region

druvactl create rar <name> -n <namespace> <restorepoint> --cluster-id <dest-cluster-id>

Q.3 Create a RestoreAccessRequest to restore, from a RestorePoint, on a Cluster in a different region

druvactl create rar <name> -n <namespace> <restorepoint> \

    --region <destination-region> --cluster-id <destination-cluster-id>

Q.4 Get RestoreAccessRequests by RestorePoint

druvactl get rar -n <namespace> -p <restorepoint>

Q.5 Get RestoreAccessRequests by ApplicationGroup

druvactl get rar -n <namespace> -g <applicationgroup>

Q.6 Get RestoreAccessRequests in a single namespace

druvactl get rar -n <namespace>

Q.7 Get RestoreAccessRequests across all namespaces

druvactl get rar -A

Q.8 Get RestoreAccessRequests in a single namespace

druvactl get rar -n <namespace>

Q.9 Get a specific RestoreAccessRequest detail

druvactl get rar -n <namespace> <rar>

Q.10 Get the RestoreAccessRequest token

druvactl get rar -n <namespace> <rar> -o jsonpath='{.status.accessToken}'

Restore Commands

R.1 Initiate a Restore

druvactl create restore <name> -n <namespace> <restoreaccesstoken>

R.2 Get Restores in a single namespace

druvactl get restores -n <namespace>

R.3 Get Restores across all namespaces

druvactl get restores -A

R.4 Get a specific Restore detail

druvactl get restore -n <namespace> <restore>

 

RBAC Authorization Commands

X.1 Grant RBAC to AWS roles or users

druvactl auth aws grant --role <admin/backup/restore/scheduler> --role-arn <rolearns> --user-arn <userarns>

X.2 Revoke RBAC from AWS roles or users

druvactl auth aws revoke --role <admin/backup/restore/scheduler> --role-arn <rolearns> --user-arn <userarns>

X.3 Grant RBAC to Kubernetes groups or users

druvactl auth kube grant --role <admin/backup/restore/scheduler> --group <groups> --user <users>

X.4 Revoke RBAC to Kubernetes groups or users

druvactl auth kube revoke --role <admin/backup/restore/scheduler> --group <groups> --user <users>

Version Command

V.1 Get druvactl version

druvactl version

Help Command

H.1 Display help for druvactl

druvactl help

AutoComplete Command

G.1 Generate autocomplete script for bash

druvactl completion bash

G.2 Generate autocomplete script for zsh

druvactl completion zsh

G.3 Generate autocomplete script for fish

druvactl completion fish

G.4 Generate autocomplete script for powershell

druvactl completion powershell