Cloud Platform provides the following custom Drush commands for your use:
| Command | Description |
|---|---|
| ah-db-backup | Creates a database backup from the command line. |
| ah-db-import | Imports a database from the command line. For more information, see Downloading database backups from the command line or Importing your database. |
| ah-site-archive-import | Imports a website archive file, as described in Importing an existing application using Drush. |
| ah-sql-cli | Opens a MySQL command-line interface using Drupal’s credentials. |
| ah-sql-connect | Display a MySQL command for connecting to a Cloud Platform database. |
ah-db-backup
This command backs up a database on Cloud Platform from the command line.
| Alias | Arguments |
|---|---|
| (none) |
|
This command accepts the following options, in the format --option=value:
retain: The number of daily backups to retain.ah-syslog: Log the output of this command via syslog,structure-tables-list: Comma-separated list of tables to backup only the structure (no data, only the CREATE TABLE command)skip-tables-list: Comma-separated list of tables to skip in the backup.structure-tables-key: A key in the$structure_tablesarray. See example.drushrc.php.skip-tables-key: A key in the$skip_tablesarray. See example.drushrc.php.
ah-db-import
Imports a Drupal database, using MySQL, converting tables to InnoDB format in the process.
| Alias | Arguments |
|---|---|
| (none) | file: The SQL file to import, with a file path relative to the Drupal root. If the filename ends in .gz, the file will first be extracted to $TMP. |
ah-site-archive-import
Import a Drupal site archive file into Cloud Platform. This command requires a Drush alias for the Cloud Platform environment into which to import, such as drush @[sitename].[env] ah-sari ./archive.tgz.
| Alias | Arguments |
|---|---|
ah-sar-import, ah-sari | filename: The archive file to import. |
This command accepts the following option, in the format --option=value:
extract-into: The temporary directory into which to extract the archive.
ah-sql-cli
Open a SQL command-line interface using Drupal’s credentials.
| Alias | Arguments |
|---|---|
ah-sql-cli | (none) |
This command accepts the following option, in the format --option=value:
db: The environment-agnostic database name. Defaults to the default primary Drupal database for the website. For more information, see Viewing database information.
ah-sql-connect
Display a MySQL command for connecting to a Cloud Platform database.
| Alias | Arguments |
|---|---|
| (none) | (none) |
This command accepts the following option:
db: The environment-agnostic database name. Defaults to the default primary Drupal database for the website. For more information, see Viewing database information.