Scale down DataRobot application services¶
Taking periodic backups doesn't require stopping the DataRobot application. However, stopping the application during the backup and restoration process is recommended in scenarios where absolute data consistency is crucial (for example, migration). This helps prevent any conflicting transactions while the database is being restored.
-
Graceful Shutdown: Coordinate with stakeholders to schedule a maintenance window for stopping the application gracefully. Notify users in advance to minimize disruptions.
-
Application Connection Termination: Ensure that all active connections to the PostgreSQL database from the application are terminated before initiating the restoration.
-
Database Locks: Consider applying locks or restrictions to prevent any write operations on the database during the restoration process.
備考
You must fulfill the prerequisites before proceeding.
Before scaling the application down, annotate each deployment with a number of replicas that it's currently running:
for d in $(kubectl -n $NAMESPACE get deploy -o name -l release=dr); do
r=$(kubectl -n $NAMESPACE get $d -o jsonpath='{.spec.replicas}')
kubectl -n $NAMESPACE annotate --overwrite $d replicas=$r
done
Scale the application services down:
kubectl -n $NAMESPACE scale deploy -l release=dr --replicas=0
kubectl -n $NAMESPACE scale deployments/pcs-pgpool --replicas=0