Skip to content

[Optional] Scale back the DataRobot Application services

Taking periodical backups does not require stopping the DataRobot application. However, application start is required if DataRobot was stopped prior to back up.

Prerequisites

  • Utility kubectl version 1.23 is installed on the host where the backup is created
  • Utility kubectl is configured to access the Kubernetes cluster where the DataRobot application is running. Verify this with the kubectl cluster-info command.

Export name of DataRobot application Kubernetes namespace in DR_CORE_NAMESPACE variable:

export DR_CORE_NAMESPACE=<namespace>

If stopped properly, every application service is annotated with a desired number of replicas. Scale the services back to this state:

for d in $(kubectl -n $DR_CORE_NAMESPACE get deploy -o name -l release=dr); do
    r=$(kubectl -n $DR_CORE_NAMESPACE get $d -o jsonpath='{.metadata.annotations.replicas}')
    kubectl -n $DR_CORE_NAMESPACE scale $d --replicas=$r
done
kubectl -n $DR_CORE_NAMESPACE scale deployments/pcs-pgpool --replicas=3

After application services are scaled back to their original state, remove the annotations:

for d in $(kubectl -n $DR_CORE_NAMESPACE get deploy -o name -l release=dr); do
    kubectl -n $DR_CORE_NAMESPACE annotate $d replicas-
done