AlloyDB CLI Usage
Ensure you have the Google Cloud SDK installed and authenticated (gcloud auth login) before running these commands.
Manage AlloyDB resources using the gcloud alloydb command group.
Clusters
Create a cluster:
gcloud alloydb clusters create CLUSTER_ID --region=REGION \ --password=PASSWORD --network=VPC_NAMEList clusters:
gcloud alloydb clusters list --region=REGIONGet cluster information:
gcloud alloydb clusters describe CLUSTER_ID --region=REGIONDelete a cluster:
gcloud alloydb clusters delete CLUSTER_ID --region=REGIONInstances
Create a primary instance:
gcloud alloydb instances create INSTANCE_ID --cluster=CLUSTER_ID \ --region=REGION --instance-type=PRIMARY --cpu-count=8Create a read pool instance:
gcloud alloydb instances create INSTANCE_ID --cluster=CLUSTER_ID \ --region=REGION --instance-type=READ_POOL \ --read-pool-node-count=2 --cpu-count=2List instances:
gcloud alloydb instances list --cluster=CLUSTER_ID --region=REGIONRestart an instance:
gcloud alloydb instances restart INSTANCE_ID --cluster=CLUSTER_ID \ --region=REGIONScale read pool horizontally (node count):
gcloud alloydb instances update INSTANCE_ID --cluster=CLUSTER_ID \ --region=REGION --read-pool-node-count=NODE_COUNTScale instance vertically (CPU count):
gcloud alloydb instances update INSTANCE_ID --cluster=CLUSTER_ID \ --region=REGION --cpu-count=CPU_COUNTScale instance vertically (machine type):
gcloud alloydb instances update INSTANCE_ID --cluster=CLUSTER_ID \ --region=REGION --machine-type=MACHINE_TYPE
Backups & Restore
Create an on-demand backup:
gcloud alloydb backups create BACKUP_ID --cluster=CLUSTER_ID \ --region=REGIONList backups:
gcloud alloydb backups list --region=REGIONConfigure continuous backup recovery window:
gcloud alloydb clusters update CLUSTER_ID --region=REGION \ --continuous-backup-recovery-window-days=DAYSEnable and configure automated scheduled backups:
gcloud alloydb clusters update CLUSTER_ID --region=REGION \ --automated-backup-days-of-week=DAYS_OF_WEEK \ --automated-backup-start-times=START_TIMES \ --automated-backup-retention-period=RETENTION_PERIODExample:
--automated-backup-days-of-week=MONDAY,WEDNESDAY,FRIDAY --automated-backup-start-times=01:00 --automated-backup-retention-period=30dDisable automated backups:
gcloud alloydb clusters update CLUSTER_ID --region=REGION \ --disable-automated-backupRestore from a discrete backup:
gcloud alloydb clusters restore DEST_CLUSTER_ID --region=REGION \ --backup=BACKUP_IDRestore to a point in time (PITR):
gcloud alloydb clusters restore DEST_CLUSTER_ID --region=REGION \ --source-cluster=SOURCE_CLUSTER_ID \ --point-in-time=TIMESTAMPNote: TIMESTAMP must be in RFC 3339 format, e.g.
2026-07-30T15:00:00.00Z.