This snippet shows how to create a new cluster by restoring it from a backup of a Cloud SQL for PostgreSQL instance. This is useful for migrating a database from Cloud SQL.
Code sample
C#
To authenticate to AlloyDB, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
What's next
To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.