pantheon-systems/terminus — pull request #10 by mikemilano (2013-08-27 03:03:03+00:00)
Title: psite-download-backup with support for site-name, latest, and user promp...

Not sure if this is part of the roadmap, but I wanted to add a drush command to easily download backups. The next step might be to create support for a backup-sync, as an alternative to sql-sync.

- Added command: pantheon-site-download-backup / psite-dl-backup
- It takes the same arguments as psite-get-backup, and 1 additional for destination
- It features a generic prompt setup that can be used elsewhere in absense of arguments
- It will take the site name as well as the site uuid
- It will take "latest" as the bucket value to retrieve the most recent backup.

Examples:
```
$ drush psite-dl-backup ab123ab-klj234oiu-g21lidngilpskdfh dev 1234504000_automated database ./
```

```
$ drush psite-dl-backup mysitename dev latest database ./
```

```
$ drush psite-dl-backup
Select a site.
[0] : Cancel
[1] : mysitename enterprise site-uuid
1
Select an environment.
[0] : Cancel
[1] : dev
[2] : test
[3] : live
1
Backup type.
[0] : Cancel
[1] : database
[2] : files
[3] : code
1
Select a backup.
[0] : Cancel
[1] : mysite_dev_2013-08-26T08-00-00_database.sql.gz 7.45 MB
[2] : mysite_dev_2013-08-25T08-00-00_database.sql.gz 7.49 MB
[3] : mysite_dev_2013-08-24T08-00-00_database.sql.gz 7.64 MB
[4] : mysite_dev_2013-08-24T07-01-15_database.sql.gz 7.33 MB
1
Select a destination [./]:
```