Information for: DEVELOPERS   PARTNERS

Drush and Databases on Cloud Platform

When referencing an environment-specific database in an Cloud Platform Drush command you should not add your sitename’s environment (for example, stg) to the database name, as shown in the following example:

drush @mysitegroup.test ac-database-instance-backup mysitegroupstg

Using the previous command will give you the following error, because no database named mysitegroupstg exists:

message : Resource not found
API status code 404

The error occurs because Cloud Platform uses the same database name regardless of the environment. Appending the environment to the database name changes the database named in the command to a database that does not exist in your subscription, resulting in a 404 error.

The following command is an example of a correctly-formatted command:

drush @mysitegroup.test ac-database-instance-backup mysitegroup