Skip to content

New Tool Proposal: ac-db #2

@jeffgeorge

Description

@jeffgeorge

Acquia's Database Manipulation tools in Drush leave something to be desired.

To download a latest database copy, you have to do the following:

  1. drush @site.env ac-database-list to get the list of database names, and parse the result
  2. drush @site.env ac-database-instance-backup-list dbname to get a list of available backups, which you then have to iterate over to get the last one
  3. drush @site.env ac-database-instance-backup-download dbname backup-id to actually download said backup
  4. Then it's on you to load it

This is awful. While you can technically do this and it should technically be faster, it's clumsy and easier to just go do it through the UI.

However, if I could just run ac-db @site.env download, I'd actually use it.

So that's what I'd like. Oh. and with pv for progress bar of the download, assuming one doesn't come out of the box when downloading a dump via Drush.

Once we've got downloading, I could see extending it to support loading backups into a local environment, possibly with pre-processing, though I know that's available via an existing one-liner drush command.

Building this will help with future iteration on ac-update.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions